• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Annotations for Environment Entries

 
Ranch Hand
Posts: 491
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: 2180
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: 491
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?
 
pie. 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