Shawn Jiang wrote:
> I encounter the same problem. Here is my case.
> 1, deploy a ear package contain a session bean(deployed JNDI name
> "CounterBeanRemote") implement a remote interface.
>
> 2, deploy a war package that contains a servlet using
> @EJB(mappedName="CounterBeanRemote") to inject the EJB.
I'm not sure how this is applicable to remote ejb references but to
get injection to work in G I've always had to declare a ejb-local-ref
in web.xml:
<ejb-local-ref>
<ejb-ref-name>SomeBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>com.example.app.SomeBeanRemote</local>
</ejb-local-ref>
...or something like that. Did you do that in your project?
Without the ejb-local-ref the injection wont happen, even if the bean
is declared within the same application ear.
--
Fredrik Jonson