• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS in Stateless Bean

 
Viji San
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34859
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stateless beans are pooled so it wouldn't need to be repeatedly injected anyway, right?
 
Viji San
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic