Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about Bean Pools

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Entity beans,Message driven beans and stateless beans all uses bean pool.
But life cycle only show pool for entity beans.Life cycle never shows pool for MDB and stateless beans.
Why pool is never shown for MDB and Stateless session beans?

Thanks
 
Sanjeev BhimaRao
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For MDB and Stateless Session beans, ejbActivate() / ejbPassivate() calls are never called when the bean goes in and out of the pool, i.e. they are not notified. If they are in a transaction, they never go to the pool. Hence, it makes no difference to their lifecycle.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gowhar said:
Why pool is never shown for MDB and Stateless session beans?


The specification does not mandated to pool the MDB's and Stateless session
You can instantiate a new bean everytime you need one. The vendors though
pool the beans for optimization.

Sanjeev said
If they are in a transaction, they never go to the pool


This applies only to stateful session beans.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic