Hey

> Ken Jenks writes:
>  >
System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingC
ontextFactory");
>  >
System.setProperty("java.naming.provider.url","206.233.214.192:1099");
>  >
>  >      InitialContext jndiContext = new InitialContext();
>
> AAAAAARRRRRGGGGGHHHHH! Hard coded string constants!

Yeah, agree. Not good.

>  > You can skip setting the System properties if you launch your client
with a
>  > command line something like this:
>  >    java -classpath (whatever)
>  > -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
>  > -Djava.naming.provider.url=206.233.214.192:1099 RemoteTest
>
> Better...

Yes, but why don't people use jndi.properties??? That seems so much better
to me.

/Rickard





--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to