commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terry K <>
Subject selection algorithm used by borrowObject
Date Tue, 23 Oct 2007 22:25:39 GMT

Out of a collection of idle objects to choose from, which object will the
borrowObject() method return? Is it the oldest idle object? A random object?
The next object in an arraylist?

I want to pool JMS sessions and ideally would prefer an Iterator of the idle
objects to check for messages. Otherwise, i will have to borrow all objects
testing for messages then return all the objects back into the pool. 
Convoluted, I know.

On the other hand I want to round-robin utilise the pooled JMS Sessions.

Alll feedback welcome.

View this message in context:
Sent from the Commons - User mailing list archive at

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

View raw message