Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting InitialContext for a Remote Client

 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anybody know the correct environment for a client accessing an EJB on a remote server running Sun's RI?

java.util.Hashtable env = new java.util.Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"SomeFactory");
env.put(Context.PROVIDER_URL,
"a_server:1090");
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not used RI. But the properties should be defined in 'jndi.properties' file located somewhere. Search for this properties file in j2ee*.jar or in the client jar returned after deployment.
 
Saket Barve
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Daniel,

Include appserv-rt.jar in your classpath. With this, you should be all set with instantiating InitialContext without any parameters at all.

Regards,
Saket
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic