Ahhh... now I understand your question:

This is something you can easily do in JNDI. You could create a method like 
this. the returned Context will be bound to the host you pass as a parameter:


  | 
  | 
  |    // the default method
  |    protected Context createContext() throws Exception
  |    {
  |         return createContext("jnp://localhost:1099");
  |    }
  |    protected Context createContext(String host) throws Exception
  |    {
  |       Properties props = new Properties();
  | 
  |       props.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
  |       props.put(Context.PROVIDER_URL, host);
  |       props.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
  | 
  |       return new InitialContext(props);
  |    }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068867#4068867

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068867
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to