This content has been marked as final.
Show 1 reply
-
1. Re: Obtaining the Container in an Interceptor
wolfc Jun 4, 2010 3:23 AM (in response to alrubinger)What exactly do you need from the container?
The code you quote must never be used from an interceptor it's either:
AbstractContainer.getContainer(invocation.getAdvisor());
or
EJBContainer.getContainer(invocation.getAdvisor());
depending on which container you want to talk (the low-level one or the real one).
Alternatively and I think the better approach, because we should be moving away from AOP and onto the real interceptor API.
InvocationContext context = CurrentInvocationContext.get(); AsyncBeanManager manager = (AsyncBeanManager) context.getBeanManager();
(needs work because of the cast.)
boolean doAsync = manager.isAsync(context.getMethod());