users@glassfish.java.net

Re: Standalone Client - exception invoking method on EJB3 method

From: <glassfish_at_javadesktop.org>
Date: Tue, 29 May 2007 12:22:10 PDT

The correct jndi.properties file is already in appserv-rt.jar. We don't recommend writing your
own jndi.properties -- just add appserv-rt.jar to your classpath. If you're using a stand-alone
java client the way to set the target server/port is through the -D properties that are listed in
Steps 4 and 5 :

https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#StandaloneRemoteEJB

All you need in the lookup string in the code is the global JNDI name of your Remote EJB.

( Of course, even better would be to use an Application Client so that much of this is
taken care of for you and guaranteed to be portable. You can find more on that here :

https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#AppClientDef
)
[Message sent by forum member 'ksak' (ksak)]

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