Hi,
If you use Tomcat 3.2.1, you can put jndi.properties in the Tomcat CLASSPATH
and you do not need any System.setProperty().  That's how JNDI client has to
find its property.  And that's the more proper usage of it since you do not
need to put JNP stuffs somewhere else.
But it really depends if your JNDI client does not mess with these System
properties.  If the client overwrite them somewhere, jndi.properties will be
no help.
When I tested Catalina, I faced the problem that they come with a JNDI
implementation that harcode factory.initial and provider.url somewhere, so
you have to overwrite them in the code.  The good solution to that is to
use -nonaming on Catalina so that Catalina does not overwrite these System
properties.
I do not know with Embedded Tomcat, I do not use that.
So you have to look at what your JNDI client do and verify, when you create
a InitialContext, what the values are inside System.properties to be sure a
bad boy did not change them somewhere.
Vincent.

> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Michael
> Hustler
> Envoyé : mercredi 11 avril 2001 19:46
> À : Jboss (E-mail)
> Objet : [JBoss-user] Setting up the naming provider
>
>
> In a real system, how are people setting up the naming provider?
> Is anyone using jndi.properies?
>
> I have some code in my client to explicitly set the system properties:
>       System.setProperty("java.naming.factory.initial",
>                          "org.jnp.interfaces.NamingContextFactory");
>       System.setProperty("java.naming.provider.url",
>                          "localhost:1099");
>
> I have seen others who have defined a <context-param> for each of these
> parameters in a .xml file (ejb-jar.xml or jboss.xml?).  The env
> is then read
> in and set.
>
> Is this the normal way of doing this or is there a way to get
> jndi.properties to be read automatically?
>
> thanks!
> mike.
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to