users@glassfish.java.net

Again an _at_Local Interface

From: <glassfish_at_javadesktop.org>
Date: Tue, 13 May 2008 14:51:52 PDT

Hello,

I read a lot of posts and I looked at the FAQs. But I still
do not know how to access my local EJB with JNDI lookup
in a simple POJO.

I know how to access @Remote EJBs and I know that I can
inject my EJBs in EJBs with the @EJB annotation.

I have a simple Local Interface:
@Local
public interface IExample {...}

And a simple Bean:
@Stateless
public class ExampleBean implements IExample {...}

Now I want to do a JNDI lookup in a POJO. I know
that Glassfish do not assign standard JNDI names to
local interfaces. So what is the name of this Bean and
how can I get my object?


public class Util {
    ...
    Context ic = new InitialContext();
    IExample example = (IExample) ic.lookup("What is the name that drives me crazy?");
    ...
}

Thanks for the help.
[Message sent by forum member 'marsias' (marsias)]

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