1 23 package com.sun.enterprise.resource; 24 25 26 import javax.transaction.Transaction ; 27 import com.sun.enterprise.connectors.ConnectorConnectionPool; 28 import com.sun.logging.*; 30 import java.util.logging.Logger ; 31 import java.util.logging.Level ; 32 import com.sun.enterprise.connectors.ConnectorConstants.PoolType; 33 34 37 public class ResourcePoolFactoryImpl { 38 39 static Logger _logger = LogDomains.getLogger(LogDomains.RSR_LOGGER); 40 public static ResourcePool newInstance( String poolName, PoolType pt ) 41 throws PoolingException 42 { 43 ResourcePool pool = null; 44 45 if ( pt == PoolType.ASSOCIATE_WITH_THREAD_POOL ) { 46 pool = new AssocWithThreadResourcePool( poolName ); 47 } else { 48 pool = new SJSASResourcePool( poolName ); 49 } 50 51 if( _logger.isLoggable( Level.FINE ) ) { 52 _logger.fine( "Using Pool " + pt); 53 } 54 55 return pool; 56 } 57 } 58 | Popular Tags |