Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB - JNDI name

 
Pawan Udernani
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi-
I have been going thru some fundamental concepts behind EJB. I am not able to figure out the reasoning behind the following point:
JNDI name is a unique identifier of the ejb. This attribute resides in the vendor specific xml descriptor. Why is the unique identifier like jndi name not part of the standard ejb deployment descriptor?
Thanks,
-Pawan.
 
Bill Wang
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pawan,
ejb can be identified through local namespace as well as jndi global namespace. local namespace such as java:comp/ejb/xxxBean is the preferred way to look up ejbs in the container since it will resolve the potential name conflict. It is cross J2EE app servers. Therefore it is defined in the ejb-jar.xml as ejb-ref-name tag using ejb/xxxBean naming convention. While jndi is specific to the application server, so it is defined in the app server specific xml file.
Hope it helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic