users@glassfish.java.net

Re: Lookup problem using JNDI with Glassfish 9.1

From: <glassfish_at_javadesktop.org>
Date: Fri, 27 Apr 2007 11:09:55 PDT

Note that we don't recommend hard-coding all these JNDI parameters in a stand-alone client.
Doing so is a last resort that should be reserved for clients that are running in non-Java EE
JVMs that already define some other conflicting default naming provider, e.g. stand-alone web
servers such as Tomcat or Resin.

In the simplest case a stand-alone java client accessing Glassfish should just use the
no-arg InitialContext() and rely on the existence of the appserv-rt.jar in the classpath to
bootstrap the correct naming provider. The EJB FAQ that Sankara linked to describes this
in more detail.

 --ken
[Message sent by forum member 'ksak' (ksak)]

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