 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
db501 Guest
|
Posted: Tue Jul 29, 2003 2:34 pm Post subject: Minimum Instance Cache Size ? |
|
|
Why some servers such as JBoss have Minimum Instance Cache Size in
1) Stateful Session Bean
2) Entity Bean
After studying lifecycle of this beans I don't see how it is possible the
cache can have more beans in it than it is needed by clients.
|
|
| Back to top |
|
 |
Adam Maass Guest
|
Posted: Fri Aug 01, 2003 2:31 pm Post subject: Re: Minimum Instance Cache Size ? |
|
|
"db501" <db501 (AT) torfree (DOT) net> wrote in message:
| Quote: | Why some servers such as JBoss have Minimum Instance Cache Size in
1) Stateful Session Bean
2) Entity Bean
After studying lifecycle of this beans I don't see how it is possible the
cache can have more beans in it than it is needed by clients.
|
1. Create an instance. (In response to request.)
2. Instance services request.
3. Instance is returned to pool to await further request.
If there is an initial burst of activity followed by lower activity, the
instance pool will likely contain idle instances.
-- Adam Maass
|
|
| Back to top |
|
 |
Adam Maass Guest
|
Posted: Mon Aug 04, 2003 6:05 pm Post subject: Re: Minimum Instance Cache Size ? |
|
|
"db501" <db501 (AT) torfree (DOT) net> wrote:
| Quote: |
"Adam Maass" <adam.nospam.maass (AT) comcast (DOT) net> wrote:
"db501" <db501 (AT) torfree (DOT) net> wrote in message:
Why some servers such as JBoss have Minimum Instance Cache Size in
1) Stateful Session Bean
2) Entity Bean
After studying lifecycle of this beans I don't see how it is possible
the
cache can have more beans in it than it is needed by clients.
1. Create an instance. (In response to request.)
2. Instance services request.
3. Instance is returned to pool to await further request.
If there is an initial burst of activity followed by lower activity, the
instance pool will likely contain idle instances.
-- Adam Maass
I'm talking here about READY state in case of stateful session bean or
entity bean. In extreme case if every client calles remove() then the
number
of instances in READY state should be zero. However JBoss has "Minimum
Instance Cache Size" which is the minimum number of instances in READY
state
which implies there is always some minimum number of instances in READY
state. Why? I don't see any advantage of having this constant, and I don't
see how possibly the server can enforce minimum instances in READY state
since this number depends exclusively on clients activity.
|
READY state does not imply that the beans actually hold any useful
conversational state. It merely means that the bean instance exists and and
can be activated in response to a client request.
If every client calls remove(), then (for entity beans), a certain amount of
data will be deleted from the database, but the entity bean instances that
serviced those requests are still available and returned to a pool to
service further requests. Those further requests won't involve the same
data, but the container avoids the overhead of creating the instances to
service more requests by retaining the instances in a pool.
The Minimum Instance Cache Size (sounds like) the minimum number of
instances in the pool. Instances in the pool are not associated with any
particular request, nor any particular data.
-- Adam Maass
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|