When is the best time to use <ejb-link>? Do I have to use it everytime I want to make a reference from an EJB to another EJB?

Siva Visveswaran

[Questioner also submitted the following DD snippet:


] No - you don't have to use ejb-link every time you reference an enterprise bean component. It allows an Application Assembler to reference an EJB by name without the need to have unique names for all beans by constantly renaming them for the J2EE application. And, ofcourse, such cannot be guaranteed if one buys third-party bean components.

The example you have shown is one way that assumes the reference's EJB is in the same ejb-jar file as the referencing bean. The other way is to use a path-name


where the referenced bean is in a different jar file.

The Deployer is then responsible for binding the ejb-link references to the home of the target bean.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact