top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Why we use JNDI to access EJB?

+2 votes
49 views
Why we use JNDI to access EJB?
posted Oct 6, 2013 by Nagarajuk

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button
Because it provide access to different types of objects with a single API if we don't plan to swap the technologies? What I mean to say is there would be no scenario where we swap EJB with LDAP. So is having a single API to access both the technologies meaningful?

1 Answer

+1 vote
What is JNDI ?

It stands for Java Naming and Directory Interface. A Google search would have told you that and more.

What is its basic use?

JNDI allows distributed applications to look up services in an abstract, resource-independent way.

When it is used?

It's an interface (actually more than one) that offers several directory services (e.g. to discover and to lookup an object by name). Like any interface, you can have different implementations (EJB, LDAP, DNS, etc) and you can to use what is more suitable for solving your problem. The design benefits are the ones related to programming against the interface(if you change the implementation the client code that use the API don't needs to change)

answer Oct 6, 2013 by Deepankar Dubey
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...