public static final Any SUBTREE_SCOPE = Any.create(SearchControls.SUBTREE_SCOPE);
private static final PooledConnection acquireConnection(Context context, String ckey)
{
PooledConnection connImpl = null;
javax.naming.Context ctx = null;
try {
ConnectionManager manager = context.address().getZone().getManagerFor(ckey);
connImpl = manager.acquire(ckey);
return connImpl;
} catch (CannotReturnPooledConnectionException e) {
throw context.AcquireError(e.getMessage());
} catch (NoConnectionPoolException e) {
throw context.AcquireError("No such connection pool: " + ckey);
} catch (Exception e) {
if (ctx != null) {
try {
ctx.close();
} catch (Exception e2) {
}
}
connImpl.release();
throw context.exception(e);
}
}