[jboss-user] [EJB 3.0 Development] - Obtaining the Container in an Interceptor

Andrew Rubinger do-not-reply at jboss.com
Thu Jun 3 18:54:47 EDT 2010


Andrew Rubinger [http://community.jboss.org/people/ALRubinger] created the discussion

"Obtaining the Container in an Interceptor"

To view the discussion, visit: http://community.jboss.org/message/546135#546135

--------------------------------------------------------------
Currently we've no way of injecting the EJB Container into an Interceptor instance.

Instead, how do we feel about setting Invocation metadata to add the container under some known key in before SessionSpecContainer.invoke() calls invocation.invokeNext?  Then interceptors could grab the container via the metadata.

The other way we do this now is:

((ManagedObjectAdvisor) invocation.getAdvisor()).getContainer()


...which is good for unit tests, but in a real environment it's:

((ManagedObjectAdvisor) invocation.getAdvisor()).getContainer().getEJBContainer();


S,
ALR

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/546135#546135]

Start a new discussion in EJB 3.0 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2030]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100603/b768d390/attachment.html 


More information about the jboss-user mailing list