aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Bean vs Instance Pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Bean vs Instance Pooling" Watch "Bean vs Instance Pooling" New topic
Author

Bean vs Instance Pooling

Ajai
Ranch Hand

Joined: May 29, 2002
Posts: 198
Hi All,

I read somewhere that Bean Pooling is possible only for SLSB,does that mean
for entity and SFSB pooling (activation/passivation)we give a diff. name as instance pooling.
Is my understanding correct?

Thanks,
Ajai
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
It really depends upon how they define pooling.

The thing that really matters is this.

The instances of a Stateless Session Bean are equivalent, so that any of them can handle an incoming request.

Stateful Session Beans carrry information specific to an ongoing conversation. In order to conserve finite resources a container passivates and activates the beans as needed. As a result, in memory there are some number of instances which depending upon the application server, it's configuration and the traffice might be increased, but in general they are reused through the act of activation and passivation. It's the same thing an operating system does to swap information in and out of RAM to virtual memory on a physical disk (context switching).

So, to me both are pooled, but stateless can be used by all at anytime, whereas a Stateful bean needed to go through activation before it can be made ready for it's caller and needs to go through passivation in order to make it available for the container to use for someone else.


Byron Estes<br />Sun Certified Enterprise Architect<br />Senior Consulant<br />Blackwell Consulting Services<br />Chicago, IL<br /><a href="http://www.bcsinc.com" target="_blank" rel="nofollow">www.bcsinc.com</a>
 
 
subject: Bean vs Instance Pooling