It's not a secret anymore!
The moose likes EJB and other Java EE Technologies and the fly likes what is bean pool? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "what is bean pool?" Watch "what is bean pool?" New topic

what is bean pool?

Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
Dear sir would you please tell me that why ejb contaner use pull to store bean in statless session bean.
I have many confusion here?

-->what is bean pool?
-->when it is created first time?
-->Is it heap memory on any thing else?
-->suppose there is only one bean and many client then how many bean will in pool?

with reagrd
Arun kumar maalik
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

A bean pool is where instances go to cool off in the summer.

On a J2EE server, if a stateless EJB is extremely busy, rather than have one instance queue up all the requests, and make everyone wait in turn for a particular method to be invoked, the J2EE server can create a bunch of instances, rather than one, to service clients.

When requests cool down, the J2EE server can remove instances from the pool, essentially telling the beans to get out of the pool, towel off, and go home. This then frees up some memory.

The 'bunch of stateless Session Beans' available to handle client requests is known as a pool.

Things get much more interesting when you talk about the pool of entity beans that sit idle waiting to be assigned a state, but that's another story.

I agree. Here's the link:
subject: what is bean pool?
jQuery in Action, 3rd edition