com.mchange.v2.c3p0
Class PoolConfig
public final
class
PoolConfig
extends Object
Encapsulates all the configuration information required by a c3p0 pooled DataSource.
Newly constructed PoolConfig objects are preset with default values,
which you can define yourself (see below),
or you can rely on c3p0's built-in defaults. Just create a PoolConfig object, and change only the
properties you care about. Then pass it to the DataSources
method, and you're off!
For those interested in the details, configuration properties can be specified in several ways:
- Any property can be set explicitly by calling the corresponding method on a PoolConfig object.
- Any property will default to a value defined by a System Property, using the property name shown the table below.
- Any property not set in either of the above ways will default to a value found in a user-supplied Java properties file,
which may be placed in the resource path of
the ClassLoader that loaded the c3p0 libraries under the name /c3p0.properties.
- Any property not set in any of the above ways will be defined according c3p0's built-in defaults.
Please see c3p0's main documentation for a description of all available parameters.
public static final String ACQUIRE_INCREMENT
public static final String ACQUIRE_RETRY_ATTEMPTS
public static final String ACQUIRE_RETRY_DELAY
public static final String AUTOMATIC_TEST_TABLE
public static final String AUTO_COMMIT_ON_CLOSE
public static final String BREAK_AFTER_ACQUIRE_FAILURE
public static final String CHECKOUT_TIMEOUT
public static final String CONNECTION_TESTER_CLASS_NAME
public static final String DEFAULT_CONFIG_RSRC_PATH
public static final String FACTORY_CLASS_LOCATION
public static final String FORCE_IGNORE_UNRESOLVED_TRANSACTIONS
public static final String IDLE_CONNECTION_TEST_PERIOD
public static final String INITIAL_POOL_SIZE
public static final String MAX_IDLE_TIME
public static final String MAX_POOL_SIZE
public static final String MAX_STATEMENTS
public static final String MAX_STATEMENTS_PER_CONNECTION
public static final String MIN_POOL_SIZE
public static final String NUM_HELPER_THREADS
public static final String PREFERRED_TEST_QUERY
public static final String PROPERTY_CYCLE
public static final String TEST_CONNECTION_ON_CHECKIN
public static final String TEST_CONNECTION_ON_CHECKOUT
public static final String USES_TRADITIONAL_REFLECTIVE_PROXIES
public PoolConfig(Properties props)
public PoolConfig()
public static int defaultAcquireIncrement()
public static int defaultAcquireRetryAttempts()
public static int defaultAcquireRetryDelay()
public static boolean defaultAutoCommitOnClose()
public static String defaultAutomaticTestTable()
public static boolean defaultBreakAfterAcquireFailure()
public static int defaultCheckoutTimeout()
public static String defaultConnectionTesterClassName()
public static String defaultFactoryClassLocation()
public static boolean defaultForceIgnoreUnresolvedTransactions()
public static int defaultIdleConnectionTestPeriod()
public static int defaultInitialPoolSize()
public static int defaultMaxIdleTime()
public static int defaultMaxPoolSize()
public static int defaultMaxStatements()
public static int defaultMaxStatementsPerConnection()
public static int defaultMinPoolSize()
public static int defaultNumHelperThreads()
public static String defaultPreferredTestQuery()
public static int defaultPropertyCycle()
public static boolean defaultTestConnectionOnCheckin()
public static boolean defaultTestConnectionOnCheckout()
public static boolean defaultUsesTraditionalReflectiveProxies()
public int getAcquireIncrement()
public int getAcquireRetryAttempts()
public int getAcquireRetryDelay()
public String getAutomaticTestTable()
public int getCheckoutTimeout()
public String getConnectionTesterClassName()
public String getFactoryClassLocation()
public int getIdleConnectionTestPeriod()
public int getInitialPoolSize()
public int getMaxIdleTime()
public int getMaxPoolSize()
public int getMaxStatements()
public int getMaxStatementsPerConnection()
public int getMinPoolSize()
public int getNumHelperThreads()
public String getPreferredTestQuery()
public int getPropertyCycle()
public boolean getTestConnectionOnCheckout()
Deprecated: use isTestConnectionOnCheckout
public boolean isAutoCommitOnClose()
public boolean isBreakAfterAcquireFailure()
public boolean isForceIgnoreUnresolvedTransactions()
public boolean isTestConnectionOnCheckin()
public boolean isTestConnectionOnCheckout()
public boolean isUsesTraditionalReflectiveProxies()
public void setAcquireIncrement(int acquireIncrement)
public void setAcquireRetryAttempts(int acquireRetryAttempts)
public void setAcquireRetryDelay(int acquireRetryDelay)
public void setAutoCommitOnClose(boolean autoCommitOnClose)
public void setAutomaticTestTable(String automaticTestTable)
public void setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure)
public void setCheckoutTimeout(int checkoutTimeout)
public void setConnectionTesterClassName(String connectionTesterClassName)
public void setFactoryClassLocation(String factoryClassLocation)
public void setForceIgnoreUnresolvedTransactions(boolean forceIgnoreUnresolvedTransactions)
public void setIdleConnectionTestPeriod(int idleConnectionTestPeriod)
public void setInitialPoolSize(int initialPoolSize)
public void setMaxIdleTime(int maxIdleTime)
public void setMaxPoolSize(int maxPoolSize)
public void setMaxStatements(int maxStatements)
public void setMaxStatementsPerConnection(int maxStatementsPerConnection)
public void setMinPoolSize(int minPoolSize)
public void setNumHelperThreads(int numHelperThreads)
public void setPreferredTestQuery(String preferredTestQuery)
public void setPropertyCycle(int propertyCycle)
public void setTestConnectionOnCheckin(boolean testConnectionOnCheckin)
public void setTestConnectionOnCheckout(boolean testConnectionOnCheckout)
public void setUsesTraditionalReflectiveProxies(boolean usesTraditionalReflectiveProxies)