Hi,

I have a command line client that access a ejb the following way :

InitialContext jndiContext = new InitialContext();
Object ref  = jndiContext.lookup(args[0] +      
     "/RedressementJudiciaireResSurv");
RedressementJudiciaireResSurvHome home =
     (RedressementJudiciaireResSurvHome)PortableRemoteObject.narrow(
          ref,
          RedressementJudiciaireResSurvHome.class);

// doing things with the home

To run that client, I need to have a file called jndi.properties in my 
classpath  that contains the following properties :

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=bonzai:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

I try to put that jndi.properties files in my WEB-INF/classpath, but it 
seem to ignore it.  To make my test working, I have to do call

Hashtable h = new Hashtable();

h.put("java.naming.factory.initial",
        org.jnp.interfaces.NamingContextFactory");
h.put("java.naming.provider.url",
        "bonzai:1099");
h.put("java.naming.factory.url.pkgs",
        "org.jboss.naming:org.jnp.interfaces");

InitialContext jndiContext = new InitialContext(h);

I would like to be able to change the context tomcat used, so the 
default initial context would be the same for my web app and for my ejb 
server.  Anybody know how can I change the parameter used for the 
default InitialContext.

I'll check in JNDI resources HOW-TO, but it's talk only about how to set 
properties, not how to setup the initial context.  I also searched the 
archive, without succes.

Thanks

-- 
Guillaume Cot�
[EMAIL PROTECTED]


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to