File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI Initial Context

 
Ravi Singh
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ravi Singh
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So does it connect to the local JNDI server?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic