commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Carter <>
Subject [pool] Pool of concurrently shared objects ?
Date Tue, 23 May 2006 09:33:43 GMT
I wish to use the the pool interfaces but cannot find the features I need.

commons-pool seems geared towards serial sharing of objects: the pool only 
contains idle objects.  I wish to pool concurrently shared objects.  Let 
me be more explicit.

javax.jms.Connection is designed to be shareable amongst threads and will 
handle multiple "conversations" per connection.  I wish to have a pool of 
Connection objects with settings along the lines
maxUsersPerConnection and/or maxGlobalConnections.  This would allow a 
limited set of Connections to be distributed (round-robin) to the users of 
the pool and for the connection to be stopped/discarded only when all 
users have relinquished it.

I am writing a "quick hack" of this functionality (still using the 
ObjectPool interface) for my current project.  Is there something better 
or have I not read the docs in enough detail?

(ps. first post to these forums.  If I have made some glaring mistake in 
protocol please be understanding!)
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message