Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

stateful session bean pool size  RSS feed

 
Java Kt
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
am going through session bean material.i have doubts regarding below oints :-

1) do we mention the pool size for a specific bean or is it collective for all session bean in application?

2) lets say we mentioned the pool size as 50 for some statful session bean. Different 50 clients use them .
so now all the 50 beans maintain some state. At what point of time will these states be removed so that
if 51th clien ask for bean it does not get any previous spoilt state.?

3) lets say we mentioned the pool size as 50 for some stateless session bean and all are in use at some
point of time. If 51th client comes and ask for a bean, will that wait till some bean become free
or create new bean instance?

 
ntumba lobo
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1) Configuring the pool is done at the application server level and is vendor specific.
There is no standart, so you need to check the documentation of your server.

2)you cant pool stateful session beans.
In ejb 3 you can pool only stateless and MDB beans.

3)Yes if all the objects in your pool are in use and another client comes along
it will have to wait for a bean to complete its work before being serviced.
If you consistantly end up in this situation you may have to increase the size of your pool
to support gracefully your average nb of clients.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!