private final void unsetKiekerThreadLocalData() { OperationExecutionSOAPResponseOutInterceptor.CF_REGISTRY.unsetThreadLocalTraceId(); OperationExecutionSOAPResponseOutInterceptor.CF_REGISTRY.unsetThreadLocalEOI(); OperationExecutionSOAPResponseOutInterceptor.CF_REGISTRY.unsetThreadLocalESS(); OperationExecutionSOAPResponseOutInterceptor.SESSION_REGISTRY.unsetThreadLocalSessionId(); OperationExecutionSOAPResponseOutInterceptor.SOAP_REGISTRY.unsetThreadLocalInRequestIsEntryCall(); OperationExecutionSOAPResponseOutInterceptor.SOAP_REGISTRY.unsetThreadLocalInRequestTin(); OperationExecutionSOAPResponseOutInterceptor.SOAP_REGISTRY.unsetThreadLocalInRequestEOI(); OperationExecutionSOAPResponseOutInterceptor.SOAP_REGISTRY.unsetThreadLocalInRequestESS(); } }
private final void unsetKiekerThreadLocalData() { CF_REGISTRY.unsetThreadLocalTraceId(); SESSION_REGISTRY.unsetThreadLocalSessionId(); CF_REGISTRY.unsetThreadLocalEOI(); CF_REGISTRY.unsetThreadLocalESS(); SOAP_REGISTRY.unsetThreadLocalOutRequestIsEntryCall(); SOAP_REGISTRY.unsetThreadLocalOutRequestTin(); } }
private IBookstore createClient() { final JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); // On the client-side, we only intercept outgoing requests and incoming responses. factory.getOutInterceptors().add(new OperationExecutionSOAPRequestOutInterceptor(this.clientMonitoringController)); factory.getInInterceptors().add(new OperationExecutionSOAPResponseInInterceptor(this.clientMonitoringController)); factory.setServiceClass(IBookstore.class); factory.setAddress(TestCXFClientServerInterceptors.SERVICE_ADDRESS); return factory.create(IBookstore.class); }
String sessionId = this.getStringContentFromHeader(hdr); // null if hdr==null if (sessionId == null) { final String eoiStr = this.getStringContentFromHeader(hdr); // null if hdr==null int eoi = -1; if (eoiStr != null) { final String essStr = this.getStringContentFromHeader(hdr); // null if hdr==null int ess = -1; if (essStr != null) { final String traceIdStr = this.getStringContentFromHeader(hdr); // null if hdr==null long traceId = -1; if (traceIdStr != null) { SOAP_REGISTRY.storeThreadLocalInRequestIsEntryCall(isEntryCall); SOAP_REGISTRY.storeThreadLocalInRequestTin(tin); SOAP_REGISTRY.storeThreadLocalInRequestEOI(eoi); // eoi for this execution SOAP_REGISTRY.storeThreadLocalInRequestESS(ess); // ess for this execution
this.unsetKiekerThreadLocalData(); // unset all variables return; } else { myEoi = SOAP_REGISTRY.recallThreadLocalInRequestEOI(); myEss = SOAP_REGISTRY.recallThreadLocalInRequestESS(); tin = SOAP_REGISTRY.recallThreadLocalInRequestTin(); tout = this.timeSource.getTime(); isEntryCall = SOAP_REGISTRY.recallThreadLocalInRequestIsEntryCall(); this.unsetKiekerThreadLocalData();
.recallThreadLocalOutRequestIsEntryCall(); // NOPMD (must be requerst here!) final SoapMessage soapMsg = (SoapMessage) msg; final String eoiStr = this.getStringContentFromHeader(hdr); // null if hdr==null if (eoiStr == null) { this.unsetKiekerThreadLocalData(); return; } catch (final NumberFormatException exc) { OperationExecutionSOAPResponseInInterceptor.LOGGER.warn("Invalid EOI", exc); this.unsetKiekerThreadLocalData(); return; final String traceIdStr = this.getStringContentFromHeader(hdr); // null if hdr==null if (traceIdStr == null) { this.unsetKiekerThreadLocalData(); return; } catch (final NumberFormatException exc) { OperationExecutionSOAPResponseInInterceptor.LOGGER.warn("Invalid trace id", exc); this.unsetKiekerThreadLocalData(); return; final int myEss = OperationExecutionSOAPResponseInInterceptor.CF_REGISTRY.recallThreadLocalESS(); final long myTin = OperationExecutionSOAPResponseInInterceptor.SOAP_REGISTRY .recallThreadLocalOutRequestTin(); final long myTout = this.timeSource.getTime();
SOAP_REGISTRY.storeThreadLocalOutRequestIsEntryCall(isEntryCall); SOAP_REGISTRY.storeThreadLocalOutRequestTin(tin);
private Server startServer() { final JaxWsServerFactoryBean srvFactory = new JaxWsServerFactoryBean(); srvFactory.setServiceClass(IBookstore.class); srvFactory.setAddress(TestCXFClientServerInterceptors.SERVICE_ADDRESS); srvFactory.setServiceBean(new BookstoreImpl()); // On the server-side, we only intercept incoming requests and outgoing responses. srvFactory.getInInterceptors().add(new OperationExecutionSOAPRequestInInterceptor(this.serverMonitoringController)); srvFactory.getOutInterceptors().add(new OperationExecutionSOAPResponseOutInterceptor(this.serverMonitoringController)); return srvFactory.create(); }
String sessionId = this.getStringContentFromHeader(hdr); // null if hdr==null if (sessionId == null) { final String eoiStr = this.getStringContentFromHeader(hdr); // null if hdr==null int eoi = -1; if (eoiStr != null) { final String essStr = this.getStringContentFromHeader(hdr); // null if hdr==null int ess = -1; if (essStr != null) { final String traceIdStr = this.getStringContentFromHeader(hdr); // null if hdr==null long traceId = -1; if (traceIdStr != null) { SOAP_REGISTRY.storeThreadLocalInRequestIsEntryCall(isEntryCall); SOAP_REGISTRY.storeThreadLocalInRequestTin(tin); SOAP_REGISTRY.storeThreadLocalInRequestEOI(eoi); // eoi for this execution SOAP_REGISTRY.storeThreadLocalInRequestESS(ess); // ess for this execution
this.unsetKiekerThreadLocalData(); // unset all variables return; } else { myEoi = OperationExecutionSOAPResponseOutInterceptor.SOAP_REGISTRY.recallThreadLocalInRequestEOI(); myEss = OperationExecutionSOAPResponseOutInterceptor.SOAP_REGISTRY.recallThreadLocalInRequestESS(); tin = OperationExecutionSOAPResponseOutInterceptor.SOAP_REGISTRY.recallThreadLocalInRequestTin(); tout = this.timeSource.getTime(); isEntryCall = OperationExecutionSOAPResponseOutInterceptor.SOAP_REGISTRY .recallThreadLocalInRequestIsEntryCall(); this.unsetKiekerThreadLocalData();
private final void unsetKiekerThreadLocalData() { OperationExecutionSOAPResponseInInterceptor.CF_REGISTRY.unsetThreadLocalTraceId(); OperationExecutionSOAPResponseInInterceptor.SESSION_REGISTRY.unsetThreadLocalSessionId(); OperationExecutionSOAPResponseInInterceptor.CF_REGISTRY.unsetThreadLocalEOI(); OperationExecutionSOAPResponseInInterceptor.CF_REGISTRY.unsetThreadLocalESS(); OperationExecutionSOAPResponseInInterceptor.SOAP_REGISTRY.unsetThreadLocalOutRequestIsEntryCall(); OperationExecutionSOAPResponseInInterceptor.SOAP_REGISTRY.unsetThreadLocalOutRequestTin(); } }
private final void unsetKiekerThreadLocalData() { CF_REGISTRY.unsetThreadLocalTraceId(); CF_REGISTRY.unsetThreadLocalEOI(); CF_REGISTRY.unsetThreadLocalESS(); SESSION_REGISTRY.unsetThreadLocalSessionId(); SOAP_REGISTRY.unsetThreadLocalInRequestIsEntryCall(); SOAP_REGISTRY.unsetThreadLocalInRequestTin(); SOAP_REGISTRY.unsetThreadLocalInRequestEOI(); SOAP_REGISTRY.unsetThreadLocalInRequestESS(); } }
final boolean isEntryCall = SOAP_REGISTRY.recallThreadLocalOutRequestIsEntryCall(); // NOPMD (must be requerst here!) final SoapMessage soapMsg = (SoapMessage) msg; final String eoiStr = this.getStringContentFromHeader(hdr); // null if hdr==null if (eoiStr == null) { this.unsetKiekerThreadLocalData(); return; } catch (final NumberFormatException exc) { LOG.warn("Invalid EOI", exc); this.unsetKiekerThreadLocalData(); return; final String traceIdStr = this.getStringContentFromHeader(hdr); // null if hdr==null if (traceIdStr == null) { this.unsetKiekerThreadLocalData(); return; } catch (final NumberFormatException exc) { LOG.warn("Invalid trace id", exc); this.unsetKiekerThreadLocalData(); return; final int myEoi = CF_REGISTRY.recallThreadLocalEOI(); final int myEss = CF_REGISTRY.recallThreadLocalESS(); final long myTin = SOAP_REGISTRY.recallThreadLocalOutRequestTin(); final long myTout = this.timeSource.getTime();
OperationExecutionSOAPRequestOutInterceptor.SOAP_REGISTRY.storeThreadLocalOutRequestIsEntryCall(isEntryCall); OperationExecutionSOAPRequestOutInterceptor.SOAP_REGISTRY.storeThreadLocalOutRequestTin(tin);
private IBookstore createClient() { final JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); // On the client-side, we only intercept outgoing requests and incoming // responses. factory.getOutInterceptors() .add(new OperationExecutionSOAPRequestOutInterceptor(this.clientMonitoringController)); factory.getInInterceptors() .add(new OperationExecutionSOAPResponseInInterceptor(this.clientMonitoringController)); factory.setServiceClass(IBookstore.class); factory.setAddress(this.serviceAddress); return (IBookstore) factory.create(); }
private Server startServer() { LOGGER.info("XX: {}", this.serviceAddress); final JaxWsServerFactoryBean srvFactory = new JaxWsServerFactoryBean(); srvFactory.setServiceClass(IBookstore.class); srvFactory.setAddress(this.serviceAddress); srvFactory.setServiceBean(new BookstoreImpl()); // On the server-side, we only intercept incoming requests and outgoing // responses. srvFactory.getInInterceptors() .add(new OperationExecutionSOAPRequestInInterceptor(this.serverMonitoringController)); srvFactory.getOutInterceptors() .add(new OperationExecutionSOAPResponseOutInterceptor(this.serverMonitoringController)); return srvFactory.create(); // create() also starts the server }
private void unsetKiekerThreadLocalData() { CF_REGISTRY.unsetThreadLocalTraceId(); SESSION_REGISTRY.unsetThreadLocalSessionId(); CF_REGISTRY.unsetThreadLocalEOI(); CF_REGISTRY.unsetThreadLocalESS(); SOAP_REGISTRY.unsetThreadLocalOutRequestIsEntryCall(); SOAP_REGISTRY.unsetThreadLocalOutRequestTin(); } }
private void unsetKiekerThreadLocalData() { CF_REGISTRY.unsetThreadLocalTraceId(); SESSION_REGISTRY.unsetThreadLocalSessionId(); CF_REGISTRY.unsetThreadLocalEOI(); CF_REGISTRY.unsetThreadLocalESS(); SOAP_REGISTRY.unsetThreadLocalOutRequestIsEntryCall(); SOAP_REGISTRY.unsetThreadLocalOutRequestTin(); } }