This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Initial Context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Initial Context" Watch "Initial Context" New topic
Author

Initial Context

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I am using weblogic 5.1
There are several ways to get the initial context. Can anyone tell the difference between the following two?
******************************************************
InitialContext ic = JNDIConfiguration.getInitialContext();
******************************************************
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
try{
InitialContext ic = new InitialContext(env);
}.....
********************************************************
George Brown
Ranch Hand

Joined: Sep 26, 2000
Posts: 919
Where did you find the 'JNDIConfiguration' class?
Does it by any chance wrap the second example you cite?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Initial Context