wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes How EJB3 logical name mapped to real JNDI name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "How EJB3 logical name mapped to real JNDI name" Watch "How EJB3 logical name mapped to real JNDI name" New topic
Author

How EJB3 logical name mapped to real JNDI name

Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 385
Hi

I have a question about mapping logical name to real JNDI name.

here is my code

EJB:



Cliet:



Client is application-client and i have no problem in running this application.

But my question is how the logical name is mapped to real name of the ejb.
In the above code i used the name attribute in the EJB annotation inthe client code so that i want to refer this ejb as "TestSLAnnotationBean" under Environment naming context so that i can look up under "java:comp/env/TestSLAnnotationBean".

But i am not mapping this logical name to real JNDI name of the EJB,still application server was able to inject ejb into this variable.

If it were ejb2.1 we would have used ejb-jar.xml with ejb-ref tag and the vendor specific plan to map the ejb-name to the jndi name.\

But how it is handled in EJB3?

This is just for learning purpose and i am interested to know how it works automatically?


SCJP 6,SCWCD 5,SCBCD 5

Failure is not an option.
 
 
subject: How EJB3 logical name mapped to real JNDI name
 
Similar Threads
Resource injection for env entry in the field
ejb myclipse weblogic error
NameNotFoundException with SUN's Application Server 8.1
Still having problem with my first EJB3
EJB3 injection with the logical name