hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
Subject RE: Eviction of pooled services
Date Fri, 08 Jul 2005 12:44:57 GMT


To answer the question, I don't think the service implementation object is
ever really freed from the pool once it's instantiated.  The "pool" in this
case is simply an ArrayList.  The pooling algorithm is very rudimentary.
Once the object is no longer needed by the current thread, it's just added
back to the pool.  There's nothing that I can tell that evicts idle objects
from the pool.  You could look into creating a more robust implementation by
extending PooledServiceModel yourself or put an issue out in JIRA for it.  I
know that we're reluctant to have too many dependencies for HM, so adding a
dependency to commons-pool would probably be vetoed (but you'd have my
vote).  I've tried to suggest refactoring some of the code so that it uses
commons-beanutils, but that was quickly rejected.





From: James Carman [] 
Sent: Friday, July 08, 2005 8:26 AM
To:; 'belaran'
Subject: RE: Eviction of pooled services



That's not his question.  He wants to know when the object will be
freed/evicted from the pool so that it is even eligible for gc.



From: belaran [] 
Sent: Friday, July 08, 2005 8:23 AM
Subject: Re: Eviction of pooled services


As far as I understand the garbage collector, there is no real way to know.
At some point, the garbage collector enters in action, degrades the perf but
clean all object that are no longer referenced... Period. 
You cannot order it to clean this more quickly, you cannot clean yourself (
at least not the memory) and you don't really have control on it...

2005/7/8, David J. M. Karlsen <>:

Hi all!

How long will a pooled service instance be kept instanciated after being
released from a thread? (eg. idle time before freed/garbage collected)

To unsubscribe, e-mail:
For additional commands, e-mail:

"What'do'ya mean ?"
"As a moto, I just avoid meaning anything..." 

View raw message