Search in sources :

Example 1 with WebsphereAsyncListener

use of com.navercorp.pinpoint.plugin.websphere.WebsphereAsyncListener in project pinpoint by naver.

the class WCCRequestImplStartAsyncInterceptor method doInAfterTrace.

@Override
protected void doInAfterTrace(SpanEventRecorder recorder, Object target, Object[] args, Object result, Throwable throwable) {
    if (validate(target, result, throwable)) {
        final AsyncContext asyncContext = (AsyncContext) result;
        final AsyncListener asyncListener = new WebsphereAsyncListener(this.traceContext, recorder.recordNextAsyncContext(true));
        asyncContext.addListener(asyncListener);
        if (isDebug) {
            logger.debug("Add async listener {}", asyncListener);
        }
    }
    recorder.recordServiceType(WebsphereConstants.WEBSPHERE_METHOD);
    recorder.recordApi(methodDescriptor);
    recorder.recordException(throwable);
}
Also used : AsyncListener(javax.servlet.AsyncListener) WebsphereAsyncListener(com.navercorp.pinpoint.plugin.websphere.WebsphereAsyncListener) WebsphereAsyncListener(com.navercorp.pinpoint.plugin.websphere.WebsphereAsyncListener) AsyncContext(javax.servlet.AsyncContext)

Aggregations

WebsphereAsyncListener (com.navercorp.pinpoint.plugin.websphere.WebsphereAsyncListener)1 AsyncContext (javax.servlet.AsyncContext)1 AsyncListener (javax.servlet.AsyncListener)1