I am trying to find out what is the best way of using a remote object acquired 
through a lookup...

Currently I am thinking of using one of these two techniques:
1. Do a lookup every time I want to use the remote object.
2. Do the lookup once, use it and only when it fails (for whatever reason), 
perform the lookup again.

The remote lookup code:


  | Hashtable<String, String> env = new Hashtable<String, String>();
  | env.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
  | env.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
  | env.put("jnp.discoveryTimeout", "1000");
  | env.put(Context.PROVIDER_URL, remotehost);
  | 
  | InitialContext ctx = new InitialContext(env);
  | ctx.lookup(jndiName);
  | 

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

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

Reply via email to