aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Problem in using Inital Context Factory class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problem in using Inital Context Factory class" Watch "Problem in using Inital Context Factory class" New topic
Author

Problem in using Inital Context Factory class

Issac Abbas
Greenhorn

Joined: Jan 29, 2002
Posts: 10
I have installed J2EE 1.3.1. I have deployed my EJBs. When i wanted to lookup, I specify INITIAL_CONTEXT_FACTORY as "com.sun.enterprise.naming.SerialInitContextFactory". I got another new installation of J2EE 1.3.1 with the same beans deployed. When i try to create initial context with the same factory class, i am unable to connect. When i change my factory class to "com.sun.jndi.cosnaming.CNCtxFactory", it is working fine. What is the factor that decides which factory class to use? When i use the same version of J2EE, why should i need different factory classes to connect.?? Any clarifications on this regards is highly appreciated.
You can also reach me by : issac.abbas@wipro.com
Mon Mayor
Ranch Hand

Joined: Mar 07, 2002
Posts: 40
Let me try!
The CNCtxFactory is the sun's cosnaming implementation. This is the naming service used for iiop. The SerialInitCtxFactory class instantiates the class name provided by the Context.Initial_Context parameter, whatever it be and that is all the work it does. If you provide a LDAP implementation then it will instantiate that class. So if you just provide the SerialInitCtx name as a parameter you still do not have a naming service. Hope this helps.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem in using Inital Context Factory class
 
Similar Threads
What is NoInitialContextException?
Question for readers of Head First Design Patterns
Simple Factory vs Factory method
JMS and JNDI
Java E-Commerce