• Post Reply Bookmark Topic Watch Topic
  • New Topic

How EJB3 logical name mapped to real JNDI name  RSS feed

Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

here is my code



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?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!