File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes a JNDI basic doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "a JNDI basic doubt" Watch "a JNDI basic doubt" New topic

a JNDI basic doubt

Rauhl Roy
Ranch Hand

Joined: Aug 01, 2006
Posts: 401

Are we supposed to have a special software for creating JNDI name?

And How do we know that JNDI is created for me to look up the object in my EJB program?

and where does these names, contexts stay in? (web server or application server or databse or anywhere else?)

Thanks in advance
rahul roy.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968


When components like EJBs are deployed, they have JNDI names attached to them, although the names are usually very uninteresting, such as the package/class name of the EJB. When you create/deploy a datasource, similarly, you provide a JNDI name for the resource to be looked up with.

A J2EE applicaiton server maintains a Naming Service. It's required by any J2EE application server. We don't have to worry too much about it. Because people much smarter than us implement it and design the naming service, it should never fail and never go down. At least that's the J2EE promise.

How is a Java Naming service implemented? Well, it's up to the vendor. As long as it conforms to the JNDI spec, vendors can do it any way they want. In my opinion, I think the big blue JNDI server looks an awful lot like the big blue CORBA naming service, but that's purely speculation.

Wouldn't you know it, but I've got a link on my website that talks all about naming:

Some of the stuff is WebSphere specific, but most of it is really just J2EE and JNDI general stuff.

Happy Naming!

I agree. Here's the link:
subject: a JNDI basic doubt
It's not a secret anymore!