Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Need for ejb-link

Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I need to refer an enterprise bean from another, I can use the ejb-ref element. Within this element I specify the home and remote interfaces of the target bean. Now I can do a JNDI lookup of the target bean uing the ejb-ref-name.
Now my doubt is what is the benefit of the optional ejb-link element ? What additional purpose does it serve ?
Cowgirl and Author
Posts: 1589
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, or application assembly, ejb-link can be used when you are referring to another bean within the same .ear file. But it's optional... so why use it?
A couple of reasons;
* It allows the container to (potentially) do some optimizations.
* More importantly, it allows you to have two or more beans with the same <ejb-name> in the same .ear file, and distinguish between them (see page 420 in the spec, for an example).
Java technology is everywhere...If you develop software and haven't learned
Java, it's definitely time to dive in -- Head First.
-Scott McNealy, Sun Microsystems Chairman, President and CEO
eat bricks! HA! And here's another one! And a tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic