• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

question on ejb-link

Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I am having some confusion about ejb-link.
1) If an EJB refers to another EJB which is defined in the same/different ejb-jar file of the SAME J2EE app., the deployer must use ejb-link to refer to the target EJB.
2) What if an EJB wants to refer to another EJB in a different J2EE app. or even in a different container? It can do that by using JNDI to find the home interface for that remote EJB, right?
Now, the programming interface for both 1) and 2) see identical, both use JNDI and narrow to the home interface of another EJB, what is the difference and why is ejb-link necessary in 1) but not 2)?
Does ejb-link give the container some indication for performance gain since the container knows to look for the target EJB in the same J2EE application?
Posts: 11962
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the key thing is having the client stubs in the client EJB's classpath. If both EJBs reside within the same .ear, the client EJB can obtain the stub classes via the .ear classloader.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic