Search in sources :

Example 1 with JbossAsyncListener

use of com.navercorp.pinpoint.plugin.jboss.JbossAsyncListener in project pinpoint by naver.

the class RequestStartAsyncInterceptor method doInAfterTrace.

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

Aggregations

JbossAsyncListener (com.navercorp.pinpoint.plugin.jboss.JbossAsyncListener)1 AsyncContext (javax.servlet.AsyncContext)1 AsyncListener (javax.servlet.AsyncListener)1