users@glassfish.java.net

Re: SessionBean Lookup/Injection from a pojo within the same EAR

From: <glassfish_at_javadesktop.org>
Date: Wed, 17 Sep 2008 00:23:51 PDT

Hi,

can you try to specify the mappedName annotation and see if that solves it? The mappedName specifies the JNDI name.

E.g.: @Stateless(name="MessageManagerBean", mappedName="ejb/MessageManagerBean")

And in the POJO:
context.lookup("ejb/MessageManagerBean")
or
context.lookup("java:comp:env/ejb/MessageManagerBean")

I'm not sure about the last one, though. ;)

Cheers
Chris
[Message sent by forum member 'chrjohn' (chrjohn)]

http://forums.java.net/jive/thread.jspa?messageID=299746