This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes JMS in Stateless Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS in Stateless Bean" Watch "JMS in Stateless Bean" New topic
Author

JMS in Stateless Bean

Viji San
Ranch Hand

Joined: Aug 12, 2010
Posts: 35
Usually, We use ServiceLocator Pattern to Cach lookup of JMS connectionfactory, Queue etc. In EJB3, we can use DI to inject the resource as below in session bean. My question is, how does container do this injection? Does container use something like caching the lookup? Do we need to really worry about it?


Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Stateless beans are pooled so it wouldn't need to be repeatedly injected anyway, right?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Viji San
Ranch Hand

Joined: Aug 12, 2010
Posts: 35
Right. But let's say if the pool size 50, then in that case, the container has to do at least 50 lookup when more beans are needed, right?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JMS in Stateless Bean
 
Similar Threads
MDB : destinationName property for JMS queue at runtime
[EJB3]MessageDriven bean never catch message
Container injecting JMS resources to EJB dependencies
mapping jms resource from jpa entity
mapping jms resource from jpa entity