Please help me before I drive nuts!
In my EAR is a WAR and an EJB-JAR. The WAR contains a JAX-RS application
that explicitly registers a single JAX-RS resource. The JAX-RS resource
shall link to a Stateless Session Bean in the EJB-JAR. I deploy this to
GFv3.1.1_b11.
When I am programming the link manually it works:
<ejb-local-ref>
<ejb-ref-name>ejb/QUIPSY</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>de.quipsy.ws.QUIPSY</local>
<ejb-link>SuperSimple.jar#QUIPSYBean</ejb-link>
</ejb-local-ref>
de.quipsy.ws.QUIPSY quipsy = (de.quipsy.ws.QUIPSY) new
InitialContext().lookup("java:comp/env/ejb/QUIPSY");
The variable quipsy at runtime contains a reference to an instance of
@Stateless QUIPSYBean, which implements the bean's local interface
@Local de.quipsy.ws.QUIPSY. So far so good. But we now want to get rid
of web.xml and InitialContext.lookup(), so we now are using this code,
which obviously should do the same as above as it declares the exact
same information:
@EJB(beanName = "SuperSimple.jar#QUIPSYBean")
public de.quipsy.ws.QUIPSY quipsy;
But at runtime this is always null. Nothing gets injected. Neither there
is a bug report in GF's server.log!
Please, if anybody knows what the problem is and how to solve it, tell
me before I drive nuts!