Marius Bogoevici [
http://community.jboss.org/people/marius.bogoevici] created the
discussion
"Unexpected behaviour 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
Message was edited by: Marius Bogoevici, typo in title
--------------------------------------------------------------
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&...]