users@glassfish.java.net

Re: JUnit Test for EJB Client Failing

From: <glassfish_at_javadesktop.org>
Date: Tue, 25 Mar 2008 11:47:11 PST

Hi Russ,

java:comp/env is only accessible to code running within an EE container so it's not available to plain java client. We recommend that you use our naming provider to look up the remote EJB rather than explicitly instantiating the CosNaming provider. That will happen automatically if you put appserv-rt.jar in your classpath and use the no-arg InitialContext() constructor. You can find more details in our EJB FAQ :

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

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