• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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?
Thanks.
Yan
 
author
Posts: 11962
5
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic