commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Maring <bambool...@yahoo.com>
Subject [Pool] clustering and seeding
Date Fri, 19 Sep 2003 12:36:59 GMT
I've created a synchronized factory that is
responsible for creating object pools and returning
pool instances to clients wanting to borrow objects
from the pool.  However, I was wondering if anyone
could comment of best practices for seeding and
clustering.

SEEDING
Some of my pools contain objects that represent the
result sets of common long running queries.  Of
coarse, if the pool receives multiple requests to
borrow objects out of these pools before a makeObject
can complete, I see an explosion of resources while
all the requests end up running makeObject and
ultimately end up throwing away most of those objects
from the pool once things cool down.  I'd like to
prime the object pool in the same synchronized method
that creates the pool.  However, executing a number of
threads to borrowObject in order to seed the pool
seems a bit odd.  Is there a more elegant way to
invoke the makeObject?

CLUSTERING
I'm deploying these object pools into a clustered J2EE
app.  Therefore, every node in the cluster ends up
with it's own object pool.  This is not a terrible
thing for non-keyed object pools, but makes the notion
of a KeyedObjectPool seem kind of silly.  Can anyone
recommend a strategy for singleton object pools across
a cluster?

Many Thanks.
Steve Maring
Tampa, FL

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message