Hi,
I'm aving a problem accessing a stateful session bean from a
servlet. I'm using a jndi lookup to do it because I need that a client has its own bean reference...
My code is:
and I have a reference to
EJB into web.xml:
<ejb-local-ref>
<ejb-ref-name>ejb/Carrello</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home></local-home>
<local>carrello.model.CarrelloLocal</local>
</ejb-local-ref>
If I use @EJB annotation to inject the servlet, it works fine.
Instead using jndi lookup throws a NamingException because it doesn't find
java:comp/env/ejb/Carrello entry.
Any idea about the problem?
[edit]Add code tags. CR[/edit]
[ July 14, 2008: Message edited by: Campbell Ritchie ]