aspose file tools*
The moose likes Java in General and the fly likes configuring service provider for jndi lookup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "configuring service provider for jndi lookup" Watch "configuring service provider for jndi lookup" New topic
Author

configuring service provider for jndi lookup

Terril Douglas
Greenhorn

Joined: May 05, 2008
Posts: 11
Hello looking at the code snippet here:

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "file:/tmp/tutorial");
Context ctx = new InitialContext(env);

I am wondering for the env variables how do you know how to set up the service provider?

env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: configuring service provider for jndi lookup