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.
posted 14 years ago
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