Hi all,
I've read all your mails about tuning JOnAS for improvement,
thanks to all contributors. I was thinking to modify JOnAS
that way, to take into account your remarks:
Add in the JOnAS specific deploymenty descriptor 3 new tags:
For each entity bean, we could define:
shared: Y/N
poolmax: max nb of instances in memory
poolmin: min nb of instances preallocated
Then, we could change the policy when beans are not shared, by
keeping the bean instance "ready" (cached) and pre allocate at
bean loading the min nb of instances in the pool of available
instances. THe poolmax value could be used to limit the nb of instances
in memory, this for scalability.
If we analyse more deeply the code, this could be something like
this:
getContext():
if already mapped -> OK
else if instance in the pool: get it and read state.
else if count < poolmax: create a new one and read state.
else clean instances not used to decrease count
and then, create a new one...
releaseContext():
if bean shared: store state and put instance in pool.
else keep it "ready" for use (but releasable if count
become too big).
Actually, it's more complicated, because we have to deal with
transaction/no transactions, but it seems that all this could
be done. What do you think ?
--
Philippe Durieux ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bull - 1 rue de Provence - 38432 Echirolles Cedex France
[EMAIL PROTECTED]
-> Download our EJBServer at http://www.evidian.com/ejb <-
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".