users@glassfish.java.net

Re: problem with running ejb client

From: <glassfish_at_javadesktop.org>
Date: Fri, 16 Jan 2009 06:21:34 PST

You should also confirm that the JNDI name you are using ("ejb/SimpleBeanJNDI") exists. The admin console (port 4848) has a JNDI browser: click on Application Server in the LH pane and there will be a button in the RH pane called "JNDI Browsing".

FWIW, I have successfully used this mechanism:

      obj = ic.lookup(CustomerFacadeRemote.class.getName());
      customerFacade = (CustomerFacadeRemote) obj;

where the Facade is the auto-created (by NB) EJB3 facade for the bean.
[for an EJB2 bean you would use "CustomerHome.glass.getName()"]

Since you aren't getting a ClassNotFoundException it's unlikely to be a jar file problem.
[Message sent by forum member 'matterbury' (matterbury)]

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