commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Muldoon <>
Subject [Pool] Looking for best approach to seed GenericObjectPool
Date Mon, 02 Apr 2007 20:57:45 GMT
I'm using Commons Pool 1.3 and I'm looking for the best approach to 
seed, or initialize, a GenericObjectPool instance during application 
server (JBoss) startup.  It appears to me that setting minIdle alone 
will not do the trick. Apparently, I need to set 
timeBetweenEvictionRunsMillis (to a positive integer) since the Evictor 
thread will not start immediately (and it is the Evictor thread that 
will ultimately ensure minIdle instances reside in the pool). But herein 
lies the rub. I don't want to set the timeBetweenEvictionRunsMillis to 
be less than 30 minutes and I don't want to wait until 30 minutes has 
passed before the pool is seeded. I have implemented a  
GenericObjectPool  subclass and I am considering invoking startEvictor 
with a relatively small delay to seed the pool followed by a call to 
setTimeBetweenEvictionRunsMillis (when the subclass is instantiated) but 
that feels like a hack. So, anyone have a better way?

Thanks in advance,


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

View raw message