[jboss-user] [EJB 3.0 Development] - Unexpected behavious when binding to java:comp and @Startup beans

Marius Bogoevici do-not-reply at jboss.com
Thu Jun 17 12:01:00 EDT 2010


Marius Bogoevici [http://community.jboss.org/people/marius.bogoevici] created the discussion

"Unexpected behavious when binding to java:comp and @Startup beans"

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

--------------------------------------------------------------
So, for Weld-int  we bind a BeanManager to java:comp/BeanManager. In order to make it accessible to EJBs, the binding procedure works like this:

1) Obtain the JavaEEComponent which corresponds to the EJBs DU
2) From the JavaEEComponent, obtain the Context (which represents java:comp for said component)
3) Bind the BeanManager
As a bit of background, one of the interceptors that are applied to CDI-enabled EJBs is injected with a @Resource("java:comp/BeanManager")


This works fine, as long as the EJB is not a @Startup  bean. For the latter, the lookup that is performed during EJBContainer.startup() seems to miss the JavaEEComponent (debugging ComponentObjectFactory shows that CurrentComponent.get() returns null and thus JavaEEComponent is ignored - so that the BeanManager that is bound to JavaEEComponent's context is not found).

So, I'm looking forward to some clarifications concerning this - mainly to discuss what's the best way to move forward:

a) open a JIRA, fix the issue, or
b) use the SwitchBoard

Thanks,
Marius

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

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

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/20100617/07ead084/attachment.html 


More information about the jboss-user mailing list