What is the initial context factory for sun's EJB reference implementation, and how is the initial context url specified? I always see the code fragment "InitialContext ctx = new InitialContext();" but where are the initial properties specified for this to work?
Created May 4, 2012
If you are using Sun's J2EE reference implementation in developing and deploying EJBs, you are most likely including the J2EE.jar file in your classpath, which is located in %J2EE_HOME%lib. If you look inside of this jar file, you will notice that in the root of the jar file there is a jndi.properties file. This file sets up the initial context properties for the Sun J2EE reference implementation. This is why you can just make a call such as:
Context ctx = new InitialContext();
without setting up the initial context properties, when using the Sun reference platform. If you use any other J2EE Application server, you will be required to set up those properties.