At 06:24 PM 11/3/00 -0800, you wrote:
>Sorry to ask so many questions in one here.  I'm not sure if this is the same
>problem or not.  I've got jBoss running and the bean deployed. I have a 
>program
>that does this:
>
>         System.out.println("Starting");
>         Context jndiContext = null;
>         Hashtable env = new Hashtable();
>
>         String searchfor="ADMIN";
>         try {
>    searchfor=args[0];
>      } catch (Exception e) {}
>
>         System.out.println("1 Setting env");
>         env.put(Context.INITIAL_CONTEXT_FACTORY,
>"org.jnp.interfaces.NamingContextFactory");
>         env.put(Context.PROVIDER_URL, "206.233.214.192:1099");
>
>         System.out.println("2 Loading InitialContext");
>         jndiContext = new InitialContext(env);

This works for me:

     
System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
     System.setProperty("java.naming.provider.url","206.233.214.192:1099");

     InitialContext jndiContext = new InitialContext();

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

-- Ken Jenks, http://abiblion.com/

    Tools for reading.



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

Reply via email to