Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JNDI Query  RSS feed

 
Navin Pillu
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I've query about JNDI. According to JNDI specification
---------------
Naming and directory services play a vital role in intranets and the Internet by providing network-wide sharing of a variety of information about users, machines, networks, services, and applications.

Using JNDI, applications based on Java technology can store and retrieve named Java objects of any type.
---------------

So can i access any text file using JNDI? Internally how exactly it works ? Internal Working means how it searches an object? How it points to that? where these pointers are stored?

Thanks in advance
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every EJB container must provide its implementation of the JNDI 1.2 API (this is true for the EJB 2.0 spec). So, how it works, whether by pointers or some other means, is vendor-dependent and hidden behind the API. Typically, all the EJB developer needs to know is how to get an InitialContext, the entry point into the JNDI tree, and how to use the InitialContext's methods such as lookup() to obtain objects such as DataSource which had been bound to the tree.
 
Navin Pillu
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roger

Thanks for reply. But could you tell me can I access text file using JNDI?

Thanks in Advance
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can bind any object to a JNDI tree, so you can also retrieve that object. But if you create a File object, then the legaility of this is dubious as the use of the java.io package is not allowed.

What kind of data is in your text file?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!