Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean Pool Vs. Instance Pool

 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is differance between bean pool and Instance pool,
I found this in SCEA book by Paul & Joseph, Stateless session bean does bean pooling where as Stateful session bean does instance pooling

Any idea?

Thanks,
Jigar
 
Sebastian Dimunzio
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container have a number of stateless session bean created waiting for calls, when the client call a method in a stateless session bean the container get one bean from the pool and perform the call, if the same client make an other call the container could get any other bean of the pool instance or maybe the same bean, it means that one bean could be used from any client and one client could use any bean each time.
One to many client´┐Żbean relationship

With state full session bean the container create one instance of the bean, when one client call the create method , there is not a bean pool, it mans one to one client- bean relationship, but if the client take some time calling methods of the bean the container could passivate the bean serializing its state, the bean fields are copied to secondary storage, in this steep the container can either reuse or destroy the bean instance (maybe depending of the recurrent client call), if the container decide reuse the bean instance the bean instance could be used for other client. (Only the instance the field are cleared to the original state after passivation)

Best Regards
(Sorry for my english)
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sebastian for explanation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic