Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Difference between Bean pooling & instance pooling???

 
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?
 
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
 
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

 
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
 
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
 
    Bookmark Topic Watch Topic
  • New Topic