FileDocCategorySizeDatePackage
ResourcePoolFactoryImpl.javaAPI DocGlassfish v2 API3425Fri May 04 22:35:14 BST 2007com.sun.enterprise.resource

ResourcePoolFactoryImpl

public class ResourcePoolFactoryImpl extends Object
author
Aditya Gore

Fields Summary
private static Logger
_logger
private static final String
SWITCH_OFF_ACC_CONNECTION_POOLING
private static String
switchOffACCConnectionPoolingProperty
Constructors Summary
Methods Summary
public static ResourcePoolnewInstance(java.lang.String poolName, com.sun.enterprise.connectors.ConnectorConstants.PoolType pt)

    
    
             
          
        ResourcePool pool = null;
        
        if(Switch.getSwitch().getContainerType() == Switch.APPCLIENT_CONTAINER){
            if("TRUE".equalsIgnoreCase(switchOffACCConnectionPoolingProperty))
                return new UnpooledResource( poolName );
        }

        if ( pt == PoolType.ASSOCIATE_WITH_THREAD_POOL ) {
            pool = new AssocWithThreadResourcePool( poolName );
        } else {
            pool = new SJSASResourcePool( poolName );
        }

        if( _logger.isLoggable( Level.FINE ) ) {
            _logger.fine( "Using Pool " + pt);
        }

        return pool;