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 EJB and JNDI 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 "EJB and JNDI" Watch "EJB and JNDI" New topic


sakuntala devi

Joined: Jul 04, 2001
Posts: 8
Hi ,
i have a doubt :
how good one has to be with JNDI concepts to understand EJB.
is it necessary to throughly understand JNDI to master EJB.
is it enough if one knows the basics of JNDI , ie what is does and what are its uses.
somebody through light on this.
sakuntala devi.
punit pandey

Joined: Jun 28, 2001
Posts: 6
Dear sakuntala,
Mastering means mastering and must know everything related to the subject to master. EJB, JSP, JNDI, RMI ..... etc. all belongs to the J2EE family and you need basic understanding of each. But only basic understaing will work for sufficient learning of EJB (not mastering).
John Bateman
Ranch Hand

Joined: Mar 09, 2000
Posts: 320
JDNI is a lookup service/mechanism. It's pretty much the same as a DNS server that finds the machine that points to a web page. you type in '" and your DNS server returns/redirects you to a resouce. That's what JNDI does.
Because your EJB objects (Session, Entity and now Message Beans) could be deployed in a distributed environment. You have to have a way of finding them [distributed means they can be spread out all over the place]. JNDI will do this. When you deploy your "Client" Bean and make a JDNI entry for it called "Customers" all you have to do is make a lookup for "Customers" and it will return an interface to the "Client" bean.
EJB is the process (or piece of J2EE) that allows you to put business concepts, procedures and data into a transactional, secure and distributed environment.
You definately need to know how to 'use' JNDI to understand how to access and interact with your EJB objects, but I would not say you need to be a master.
Hope this helps.

SOURCE CODE should be SURROUNDED by "code" tags.
Andrew Jahchand

Joined: Jul 09, 2001
Posts: 7
On the topic of JNDI (I Think) Can anyone help.
When trying to run my stateful session bean as a J2EE client I get the following error:
Initiating login ...
Looking up authenticator...
Binding name:`java:comp/env/ejb/FibonacciSeQuence`
Application threw an exception:java.lang.NoClassDefFoundError: FibonacciHome
Unbinding name:`java:comp/env/ejb/FibonacciSeQuence`

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