in Jboss,for an ejbA lookup another ejb ejbb,
in ejba's descriptor:
ejb-jar.xml:
<ejb-ref>
<ejb-ref-name>ejb/ejbB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.company.ejb.ejbBHome</home>
<remote>com.company.ejb.ejbB</remote>
<ejb-link>ejbB</ejb-link>
</ejb-ref>
in jboss.xml
<ejb-ref>
<ejb-ref-name>ejb/ejbB</ejb-ref-name>
<jndi-name>ejbB</jndi-name>
</ejb-ref>
this defined ejb/ejbB is assoicated to ejbB
but why it need to be defined twice?
-
why ejb ref defined twice (2 messages)
- Posted by: zhang zhang
- Posted on: February 27 2004 17:25 EST
Threaded Messages (2)
- why ejb ref defined twice by Tomas Inger on March 02 2004 08:44 EST
- why ejb ref defined twice by zhang zhang on March 02 2004 09:58 EST
-
why ejb ref defined twice[ Go to top ]
- Posted by: Tomas Inger
- Posted on: March 02 2004 08:44 EST
- in response to zhang zhang
Hi!
This is actually one of the great benefits of J2Ee (although you don't see it in a simple example)! By this mapping of names - remember you don't need to have the same name i both JNDI spaces - you can avoid global name conflicts. If, for example, two projects define different EJBs with the same name you can make them work together by changeing the name of one of the EJBs in the global JNDI namespace.
/Tomas -
why ejb ref defined twice[ Go to top ]
- Posted by: zhang zhang
- Posted on: March 02 2004 09:58 EST
- in response to Tomas Inger
thank you.I'm not sure if I understand waht you mean.what does ejb-link do in ejb-jar.xml and what does jndi-name do in jboss.xml?