• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

EJB3 injection with the logical name

 
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Could somebody please explain me how this things work?



In the above code what the ejb annotation says?

Inject the reference to the TestSLAnnotationRemote and then bind the variable to the name TestSLAnnotationBean insteadof com.client.Client/client?

Please let me know if my understanding is correct.
 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Siva Masilamani wrote:In the above code what the ejb annotation says?


From JEE-API: The name element from javax.ejb.EJB defines "The logical name of the ejb reference within the declaring component's (e.g., java:comp/env) environment."

Thus, in your example, the app client deploy tool creates an entry in the app client's ENC with name "java:comp/env/TestSLAnnotationBean". During runtime the app client container performs dependency injection before it calls the app client's main method (see, for instance, JEE 6 spec, section EE.10.4).
 
Or we might never have existed at all. Freaky. So we should cherish everything. Even this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic