public static javax.resource.spi.ConnectionManager | getAvailableConnectionManager(java.lang.String poolName, boolean forceNoLazyAssoc)
Logger _logger = LogDomains.getLogger( LogDomains.RSR_LOGGER );
ConnectorRegistry registry = ConnectorRegistry.getInstance();
PoolMetaData pmd = registry.getPoolMetaData( poolName );
boolean isLazyEnlist = pmd.isLazyEnlistable();
boolean isLazyAssoc = pmd.isLazyAssociatable();
ConnectionManagerImpl mgr = null;
if ( isLazyAssoc && !forceNoLazyAssoc ) {
if (_logger.isLoggable( Level.FINE) ) {
_logger.fine(
"@@@@ Creating LazyAssociatableConnectionManager");
}
mgr = new LazyAssociatableConnectionManagerImpl(poolName);
} else if ( isLazyEnlist ) {
if (_logger.isLoggable( Level.FINE) ) {
_logger.fine(
"@@@@ Creating LazyEnlistableConnectionManager");
}
mgr = new LazyEnlistableConnectionManagerImpl(poolName);
} else {
if (_logger.isLoggable( Level.FINE) ) {
_logger.fine(
"@@@@ Creating plain ConnectionManager");
}
mgr = new ConnectionManagerImpl(poolName);
}
return mgr;
|