Skip to Content
Hi all, Accept the challenges, So that you may feel the exhilaration of Victory. Here I am putting some valuable concept about Java Naming and Directory Interface (JNDI) though my first posting, which I feel would be helpful to the programmers wishing to access the EJB using the JNDI in SAP Netweaver application server. It discusses the need for naming services, and the purposes for which Web applications use them. What is JNDI? The Java Naming and Directory Interface is part of the Java platform, which provides applications based on Java technology. It’s basically a naming and directory services. With the help of this JNDI you can build powerful and portable directory-enabled applications. image As an illustration of what JNDI does, Todd Sundsted (in a Java World article, JNDI overview, Part 1: An introduction to naming services). Sundsted says that “JNDI organizes and locates components within a distributed computing environment similarly to the way that cards catalogs (and increasingly computer applications) organize and represent the locations of books within a library. A distributed application needs a means of locating components in the same way that the library patron needs a means of locating the book: just searching around inside a library or an application is not a comprehensive way to find the object. And it’s become possible with the help of JNDI to find the application component. Because different naming and directory service providers can be seamlessly connected through the API, java applications using it can be easily integrated into various environments and coexist with legacy applications. Current version i.e. JNDI 1.2, was specified with input from Netscape, Novell, Tarantella, Sun, and BEA. JNDI is considered an industry standard.” Naming Services When we are talk about the naming services, it is simply a software application that contains names with the location of information or services. Means the software you write can utilize objects without of having knowledge about the actual location of objects. It is not necessary for the object to be reside on your local machine, where as it can be on any machine but within the network. Significance to using this service is that for most people it somehow easier to remember a logical name rather than a URL. For example, you can associate a logical name with a JDBC data source. It is easy to remember a name like Emp_empno than a JDBC URL such as jdbc:mysql://localhost:3306/empno. Fig: Basic architecture involved with using a naming service. image Pictorial representation clears that, previously it was used to bind an object into the naming service which has been resolved and the client retrieves it by specifying a name only. Some of the common naming services are. • CORBA Common Object Services (COS) • Domain Name Service (DNS) • Network Information Service (NIS) • Novell Directory Services (NDS) • File systems in general • RMI registry • Lightweight Directory Access Protocol (LDAP) Directory services Directory service is similar to a naming service, and it enables you to associate names with objects. A major distinction between the two is that a directory service enables you to store information about the object, and at the same time it’s providing mechanisms for searching for objects based on that information. Diagram of generic directory service image Above diagram is showing that directory service enables you to store information about the object, and at the same time it’s providing mechanisms for searching for objects based on that information. Reference. JNDI Tutorial Accessing Enterprise JavaBeans Using JNDI in SAP NetWeaver Application Server I had put my best efforts in my first blog to explain JNDI and its applicability. I hope that it will help my fellow SDN friends to understand JNDI and its uses.
To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply