Repository navigation
v4.2.0
Select a registered pool before borrowing a resource, so your application can finish destination-specific work without holding one. #29
ResourcePoolSelection<String, Connection> selected =
clusters.selectPoolFromCluster("outbound", options);
if (selected == null) {
throw new TimeoutException("Timed out selecting a pool");
}
prepareForDestination(selected.getPoolKey()); // your application code
PoolableObject<Connection> connection = selected.claim(options);
// Check for timeout, then use and release/invalidate as before.Selection reserves no capacity and remains tied to its original registration. Selection and acquisition each support cancellation and their own timeout budget; pass the remaining deadline when the whole operation must share one limit.
Existing combined claim methods remain unchanged. Java 8 support, Generic Object Pool 2.5.1 and JPMS module names are unchanged. Usage and lifecycle details.