Hi,
I'm trying to use CDI in a JASPIC SAM, but I'm getting mixed results.
Injection doesn't work in any case. Using GlassFish 3.1.2.2 it's also not
possible to lookup the CDI bean manager directly in JNDI using
"java:comp/BeanManager". Clearly, a SAM doesn't qualify as either a managed
bean or Java EE component.
However, using JBoss AS 7.1.3, it's possible to look up
"java:comp/BeanManager" and retrieve bean references from it.
In GlassFish, it is possible to bootstrap an EJB bean from within a JASPIC
SAM using the java:global context, inject that bean with the CDI bean
manager and then within the EJB retrieve a bean reference. Only, in this
case GlassFish will log a warning: "SEVERE: No valid EE environment for
injection of [...]" (it will still retrieve the bean though).
What is the intended behavior?
In the larger topic of the alignment of CDI with the rest of the Java EE
platform, would it be viable to take JASPIC modules into account as well?
Kind regards,
Arjan Tijms