aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JNDI Initial Context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JNDI Initial Context" Watch "JNDI Initial Context" New topic
Author

JNDI Initial Context

Ravi Singh
Ranch Hand

Joined: Aug 02, 2004
Posts: 51
When creating an initial context for a J2EE application, you can construct the initial context in two ways:

InitialContext context = new InitialContext(); // No arguments

InitialContext context = new InitialContext(Hashtable hash); // Hashtable argument

I don't understand how you can create a connection to JNDI without specifying the properties (e.g. server URL) such is the case with the no argument constructor?

Please help, anyone.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

I don't understand how you can create a connection to JNDI without specifying the properties (e.g. server URL) such is the case with the no argument constructor


It assumes some default values like localhost etc.


Groovy
Ravi Singh
Ranch Hand

Joined: Aug 02, 2004
Posts: 51
So does it connect to the local JNDI server?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNDI Initial Context
 
Similar Threads
How to call SLSB using remote interfaces in different EAR
JNDI problem
EJB Declarative Method Level Security
Service Locator Pattern
Initial Context