FileDocCategorySizeDatePackage
ConnectionManagerFactory.javaAPI DocGlassfish v2 API3800Fri May 04 22:34:22 BST 2007com.sun.enterprise.connectors

ConnectionManagerFactory

public class ConnectionManagerFactory extends Object

Fields Summary
Constructors Summary
Methods Summary
public static javax.resource.spi.ConnectionManagergetAvailableConnectionManager(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;