• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on ejb-link

 
vrayudu kumar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q4. The statement is true or false: <ejb-link> deployment descriptor element may refer to the enterprise bean in the same ejb-jar file or another ejb-jar file
Can any one explain?
Can we access another ejb-jar file using ejb-link tag?
Thanks in advance
 
Thomas De Vos
stable boy
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can.
You can use the ejb-link element in the deployment descriptor to link an
EJB reference to a target enterprise bean.
The value of the ejb-link attribute is the name of the enterprise bean you want to refer to. Actually it is the name defined in the ejb-name element.
The target enterprise bean can be in any ejb-jar file but in the same J2EE application.
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The DTD has some wording around this issue:

The value of the ejb-link element must be the ejb-name of an enterprise bean in the same ejb-jar file or in another ejb-jar file in the same J2EE application unit.
Alternatively, the name in the ejb-link element may be composed of a path name specifying the ejb-jar containing the referenced enterprise bean with the ejb-name of the target bean appended and separated from the path name by "#". The path name is relative to the ejb-jar file containing the enterprise bean that is referencing the enterprise bean. This allows multiple enterprise beans with the same ejb-name to be uniquely identified.

[ February 11, 2004: Message edited by: Reid M. Pinchback ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic