• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI lookup

Dmitry Shekhter
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically what i would like to know, is, if i have a DataSource configured and bound to a CosNaming server on one machine, and i'm developing and testing on another machine, what do i need to do to be able to use that datasource? More specifically, what is the significance of the java.naming.factory.initial environmental property,and the java.naming.provider.url environmental property.
If i'm performing the lookup of my DataSource object in the following manner:
InitialContext ictx = new InitialContext();
Object helloRef =ctx.lookup("iiopname://server:1900/some/cos/name");
what exactly goes in place of some/cos/name in the example above?
also, do i need to specify both the java.naming.factory.initial environmental property, and the java.naming.provider.url environmental property, as well as provide a url to the lookup() method, or is there a different combination?
I've went through the JNDI documentation, and several online documentations, as well as the WebSphere docs, but
have been unable to find the answer to my question. I would really appreciate any help/examples.
Thanks in advance.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic