• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Bean pooling & instance pooling???

 
Bidyut Padhi
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I hope the objective in ejb container model:
State the benifit of bean pooling in an ejb container.
is focusing on instance pooling .
is there any difference in between
Bean pooling and instance pooling?
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bean pooling refers to the App Server keeping a pool of a particular bean's instances. (It keeps pools of lots of different beans to be more precise.) So in this context I think you are right in assuming bean pooling means instance pooling.
John
 
Majid Khan
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mr Wetherbie,
Actuallly I thought the two were different,bean pooling would be more general wheras instance pooling would refer to one bean having multiple instances for concurrent access .
In what other context could they be different.
Kindly elaborate
Thanks

 
Naichen Liu
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we are talking about Stateless Sesstion Bean, instance pooling will be the same as bean pooling, in the sense of every instance in the bean pool is identical. but for stateful sesstion bean, it's different, everytime you create a new stateful session bean, have to assciate with user context, that means in stateful session ejb pool, every instance is different, it's hard to reuse them.
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EJB spec discusses pooling for entity beans and stateless session beans. Passivation/activation is used in association with stateful session beans though I suppose a vendor could implement pooling for stateful session beans under the covers.
When I said instance pooling and bean pooling were equivalent I meant in this context since the things being pooled are instances of beans.
John
 
Anil Vupputuri
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both bean and instance pooling are the same.As stateful/entity beans activate and passivate from a pool of beans.As the implementation is container specific.
Stateful Beans-pooling is not simple.when a client invokes a method on a bean , starting conversation with the bean, and the conversational state stored in the bean must be available for that same client's next method request.pooling and assigning beans to handle client method requests is not so easy, the implementation to achieve this effect of pooling depends on container to container.
Stateless Beans-this holds a conversations that span a single method call.They are stateless becz they do not hold multimethod conversation.any instance can be activated from a pool.
Entity Bean-these r recyclable objects and may be pooled depending on your container's policy.The container may pool and reuse entity bean instances to represent different instances of the same type of data in underlying storage.
So, the pooling of bean instances are different from container to container but does the same thing.
Anil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic