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
com.mchange.v2.c3p0.DataSources.pooledDataSource(javax.sql.DataSource, com.mchange.v2.c3p0.PoolConfig)
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.
ACQUIRE_INCREMENT
public static final String ACQUIRE_INCREMENT
ACQUIRE_RETRY_ATTEMPTS
public static final String ACQUIRE_RETRY_ATTEMPTS
ACQUIRE_RETRY_DELAY
public static final String ACQUIRE_RETRY_DELAY
AUTOMATIC_TEST_TABLE
public static final String AUTOMATIC_TEST_TABLE
AUTO_COMMIT_ON_CLOSE
public static final String AUTO_COMMIT_ON_CLOSE
BREAK_AFTER_ACQUIRE_FAILURE
public static final String BREAK_AFTER_ACQUIRE_FAILURE
CHECKOUT_TIMEOUT
public static final String CHECKOUT_TIMEOUT
CONNECTION_TESTER_CLASS_NAME
public static final String CONNECTION_TESTER_CLASS_NAME
DEFAULT_CONFIG_RSRC_PATH
public static final String DEFAULT_CONFIG_RSRC_PATH
FACTORY_CLASS_LOCATION
public static final String FACTORY_CLASS_LOCATION
FORCE_IGNORE_UNRESOLVED_TRANSACTIONS
public static final String FORCE_IGNORE_UNRESOLVED_TRANSACTIONS
IDLE_CONNECTION_TEST_PERIOD
public static final String IDLE_CONNECTION_TEST_PERIOD
INITIAL_POOL_SIZE
public static final String INITIAL_POOL_SIZE
MAX_IDLE_TIME
public static final String MAX_IDLE_TIME
MAX_POOL_SIZE
public static final String MAX_POOL_SIZE
MAX_STATEMENTS
public static final String MAX_STATEMENTS
MAX_STATEMENTS_PER_CONNECTION
public static final String MAX_STATEMENTS_PER_CONNECTION
MIN_POOL_SIZE
public static final String MIN_POOL_SIZE
NUM_HELPER_THREADS
public static final String NUM_HELPER_THREADS
PREFERRED_TEST_QUERY
public static final String PREFERRED_TEST_QUERY
PROPERTY_CYCLE
public static final String PROPERTY_CYCLE
TEST_CONNECTION_ON_CHECKIN
public static final String TEST_CONNECTION_ON_CHECKIN
TEST_CONNECTION_ON_CHECKOUT
public static final String TEST_CONNECTION_ON_CHECKOUT
USES_TRADITIONAL_REFLECTIVE_PROXIES
public static final String USES_TRADITIONAL_REFLECTIVE_PROXIES
defaultAcquireIncrement
public static int defaultAcquireIncrement()
defaultAcquireRetryAttempts
public static int defaultAcquireRetryAttempts()
defaultAcquireRetryDelay
public static int defaultAcquireRetryDelay()
defaultAutoCommitOnClose
public static boolean defaultAutoCommitOnClose()
defaultAutomaticTestTable
public static String defaultAutomaticTestTable()
defaultBreakAfterAcquireFailure
public static boolean defaultBreakAfterAcquireFailure()
defaultCheckoutTimeout
public static int defaultCheckoutTimeout()
defaultConnectionTesterClassName
public static String defaultConnectionTesterClassName()
defaultFactoryClassLocation
public static String defaultFactoryClassLocation()
defaultForceIgnoreUnresolvedTransactions
public static boolean defaultForceIgnoreUnresolvedTransactions()
defaultIdleConnectionTestPeriod
public static int defaultIdleConnectionTestPeriod()
defaultInitialPoolSize
public static int defaultInitialPoolSize()
defaultMaxIdleTime
public static int defaultMaxIdleTime()
defaultMaxPoolSize
public static int defaultMaxPoolSize()
defaultMaxStatements
public static int defaultMaxStatements()
defaultMaxStatementsPerConnection
public static int defaultMaxStatementsPerConnection()
defaultMinPoolSize
public static int defaultMinPoolSize()
defaultNumHelperThreads
public static int defaultNumHelperThreads()
defaultPreferredTestQuery
public static String defaultPreferredTestQuery()
defaultPropertyCycle
public static int defaultPropertyCycle()
defaultTestConnectionOnCheckin
public static boolean defaultTestConnectionOnCheckin()
defaultTestConnectionOnCheckout
public static boolean defaultTestConnectionOnCheckout()
defaultUsesTraditionalReflectiveProxies
public static boolean defaultUsesTraditionalReflectiveProxies()
getAcquireIncrement
public int getAcquireIncrement()
getAcquireRetryAttempts
public int getAcquireRetryAttempts()
getAcquireRetryDelay
public int getAcquireRetryDelay()
getAutomaticTestTable
public String getAutomaticTestTable()
getCheckoutTimeout
public int getCheckoutTimeout()
getConnectionTesterClassName
public String getConnectionTesterClassName()
getFactoryClassLocation
public String getFactoryClassLocation()
getIdleConnectionTestPeriod
public int getIdleConnectionTestPeriod()
getInitialPoolSize
public int getInitialPoolSize()
getMaxIdleTime
public int getMaxIdleTime()
getMaxPoolSize
public int getMaxPoolSize()
getMaxStatements
public int getMaxStatements()
getMaxStatementsPerConnection
public int getMaxStatementsPerConnection()
getMinPoolSize
public int getMinPoolSize()
getNumHelperThreads
public int getNumHelperThreads()
getPreferredTestQuery
public String getPreferredTestQuery()
getPropertyCycle
public int getPropertyCycle()
getTestConnectionOnCheckout
public boolean getTestConnectionOnCheckout()
use isTestConnectionOnCheckout
isAutoCommitOnClose
public boolean isAutoCommitOnClose()
isBreakAfterAcquireFailure
public boolean isBreakAfterAcquireFailure()
isForceIgnoreUnresolvedTransactions
public boolean isForceIgnoreUnresolvedTransactions()
isTestConnectionOnCheckin
public boolean isTestConnectionOnCheckin()
isTestConnectionOnCheckout
public boolean isTestConnectionOnCheckout()
isUsesTraditionalReflectiveProxies
public boolean isUsesTraditionalReflectiveProxies()
setAcquireIncrement
public void setAcquireIncrement(int acquireIncrement)
setAcquireRetryAttempts
public void setAcquireRetryAttempts(int acquireRetryAttempts)
setAcquireRetryDelay
public void setAcquireRetryDelay(int acquireRetryDelay)
setAutoCommitOnClose
public void setAutoCommitOnClose(boolean autoCommitOnClose)
setAutomaticTestTable
public void setAutomaticTestTable(String automaticTestTable)
setBreakAfterAcquireFailure
public void setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure)
setCheckoutTimeout
public void setCheckoutTimeout(int checkoutTimeout)
setConnectionTesterClassName
public void setConnectionTesterClassName(String connectionTesterClassName)
setFactoryClassLocation
public void setFactoryClassLocation(String factoryClassLocation)
setForceIgnoreUnresolvedTransactions
public void setForceIgnoreUnresolvedTransactions(boolean forceIgnoreUnresolvedTransactions)
setIdleConnectionTestPeriod
public void setIdleConnectionTestPeriod(int idleConnectionTestPeriod)
setInitialPoolSize
public void setInitialPoolSize(int initialPoolSize)
setMaxIdleTime
public void setMaxIdleTime(int maxIdleTime)
setMaxPoolSize
public void setMaxPoolSize(int maxPoolSize)
setMaxStatements
public void setMaxStatements(int maxStatements)
setMaxStatementsPerConnection
public void setMaxStatementsPerConnection(int maxStatementsPerConnection)
setMinPoolSize
public void setMinPoolSize(int minPoolSize)
setNumHelperThreads
public void setNumHelperThreads(int numHelperThreads)
setPreferredTestQuery
public void setPreferredTestQuery(String preferredTestQuery)
setPropertyCycle
public void setPropertyCycle(int propertyCycle)
setTestConnectionOnCheckin
public void setTestConnectionOnCheckin(boolean testConnectionOnCheckin)
setTestConnectionOnCheckout
public void setTestConnectionOnCheckout(boolean testConnectionOnCheckout)
setUsesTraditionalReflectiveProxies
public void setUsesTraditionalReflectiveProxies(boolean usesTraditionalReflectiveProxies)