Annotation Interface ActivateSessionContext


@InterceptorBinding @Target({METHOD,TYPE}) @Retention(RUNTIME) public @interface ActivateSessionContext
Activates the session context before the intercepted method is called, and terminates the context when the method invocation completes (regardless of any exceptions being thrown).

If the context is already active, it's a noop - the context is neither activated nor deactivated.

Keep in mind that if the method returns an asynchronous type (such as CompletionStage then the session context is still terminated when the invocation completes and not at the time the asynchronous type is completed. Also note that session context is not propagated by MicroProfile Context Propagation.

This interceptor binding is only available in tests.