• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Annotations for Environment Entries

 
Ranch Hand
Posts: 477
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Annotations for Environment Entries

When the annotation is applied to the bean class , the jndi name and the environment entry type must be explicitly specified.



Injection of EJB References

The following example illustrates use of all portable elements of the EJB annotation. In this case, the
enterprise bean reference would have the name java:comp/env/ejb/shopping-cart in the
referencing bean’s naming context. This reference is linked to a bean named cart1.



In the example above, where is the explicit specification of the jndi name and the environment entry type? If not shown, how would it look? Or have I taken this out of context?
 
Bartender
Posts: 2085
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think "ejb/shopping-cart" is the JNDI name of myCart.
"ShoppingCart" is the environment entry type.
 
Charles O'Leary
Ranch Hand
Posts: 477
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's has always been my interpretation as well. Although "explicitly specified" wording may perhaps be better worded as perhaps either implied, defaulted, or derived?
 
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
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic