I have created a standard CDI (WELD) interceptor to log method calls:
@MyInterceptorBinding
@Interceptor
public class MyInterceptor implements Serializable {
@AroundInvoke
public Object interceptMethod(InvocationContext ctx) throws Exception {
// Do some Logging Operations
try {
Object result = ctx.proceed();
return result;
} catch (Exception e) {
throw e;
}
}
}
I would like to log also the session id from which the method is called (log also the request id would be great!).
Is there any way?