Package com.mchange.v2.c3p0
Class PoolConfig
- java.lang.Object
-
- com.mchange.v2.c3p0.PoolConfig
-
public final class PoolConfig extends java.lang.ObjectDeprecated.as of c3p0-0.9.1. To manipulate config programmaticall, please use ComboPooledDataSourceEncapsulates 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.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.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACQUIRE_INCREMENTDeprecated.static java.lang.StringACQUIRE_RETRY_ATTEMPTSDeprecated.static java.lang.StringACQUIRE_RETRY_DELAYDeprecated.static java.lang.StringAUTO_COMMIT_ON_CLOSEDeprecated.static java.lang.StringAUTOMATIC_TEST_TABLEDeprecated.static java.lang.StringBREAK_AFTER_ACQUIRE_FAILUREDeprecated.static java.lang.StringCHECKOUT_TIMEOUTDeprecated.static java.lang.StringCONNECTION_TESTER_CLASS_NAMEDeprecated.static java.lang.StringDEFAULT_CONFIG_RSRC_PATHDeprecated.static java.lang.StringFACTORY_CLASS_LOCATIONDeprecated.static java.lang.StringFORCE_IGNORE_UNRESOLVED_TRANSACTIONSDeprecated.static java.lang.StringIDLE_CONNECTION_TEST_PERIODDeprecated.static java.lang.StringINITIAL_POOL_SIZEDeprecated.static java.lang.StringMAX_IDLE_TIMEDeprecated.static java.lang.StringMAX_POOL_SIZEDeprecated.static java.lang.StringMAX_STATEMENTSDeprecated.static java.lang.StringMAX_STATEMENTS_PER_CONNECTIONDeprecated.static java.lang.StringMIN_POOL_SIZEDeprecated.static java.lang.StringNUM_HELPER_THREADSDeprecated.static java.lang.StringPREFERRED_TEST_QUERYDeprecated.static java.lang.StringPROPERTY_CYCLEDeprecated.static java.lang.StringTEST_CONNECTION_ON_CHECKINDeprecated.static java.lang.StringTEST_CONNECTION_ON_CHECKOUTDeprecated.static java.lang.StringUSES_TRADITIONAL_REFLECTIVE_PROXIESDeprecated.
-
Constructor Summary
Constructors Constructor Description PoolConfig()Deprecated.PoolConfig(java.util.Properties props)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static intdefaultAcquireIncrement()Deprecated.static intdefaultAcquireRetryAttempts()Deprecated.static intdefaultAcquireRetryDelay()Deprecated.static booleandefaultAutoCommitOnClose()Deprecated.static java.lang.StringdefaultAutomaticTestTable()Deprecated.static booleandefaultBreakAfterAcquireFailure()Deprecated.static intdefaultCheckoutTimeout()Deprecated.static java.lang.StringdefaultConnectionTesterClassName()Deprecated.static java.lang.StringdefaultFactoryClassLocation()Deprecated.static booleandefaultForceIgnoreUnresolvedTransactions()Deprecated.static intdefaultIdleConnectionTestPeriod()Deprecated.static intdefaultInitialPoolSize()Deprecated.static intdefaultMaxIdleTime()Deprecated.static intdefaultMaxPoolSize()Deprecated.static intdefaultMaxStatements()Deprecated.static intdefaultMaxStatementsPerConnection()Deprecated.static intdefaultMinPoolSize()Deprecated.static intdefaultNumHelperThreads()Deprecated.static java.lang.StringdefaultPreferredTestQuery()Deprecated.static intdefaultPropertyCycle()Deprecated.static booleandefaultTestConnectionOnCheckin()Deprecated.static booleandefaultTestConnectionOnCheckout()Deprecated.static booleandefaultUsesTraditionalReflectiveProxies()Deprecated.intgetAcquireIncrement()Deprecated.intgetAcquireRetryAttempts()Deprecated.intgetAcquireRetryDelay()Deprecated.java.lang.StringgetAutomaticTestTable()Deprecated.intgetCheckoutTimeout()Deprecated.java.lang.StringgetConnectionTesterClassName()Deprecated.java.lang.StringgetFactoryClassLocation()Deprecated.intgetIdleConnectionTestPeriod()Deprecated.intgetInitialPoolSize()Deprecated.intgetMaxIdleTime()Deprecated.intgetMaxPoolSize()Deprecated.intgetMaxStatements()Deprecated.intgetMaxStatementsPerConnection()Deprecated.intgetMinPoolSize()Deprecated.intgetNumHelperThreads()Deprecated.java.lang.StringgetPreferredTestQuery()Deprecated.intgetPropertyCycle()Deprecated.booleangetTestConnectionOnCheckout()Deprecated.use isTestConnectionOnCheckoutbooleanisAutoCommitOnClose()Deprecated.booleanisBreakAfterAcquireFailure()Deprecated.booleanisForceIgnoreUnresolvedTransactions()Deprecated.booleanisTestConnectionOnCheckin()Deprecated.booleanisTestConnectionOnCheckout()Deprecated.booleanisUsesTraditionalReflectiveProxies()Deprecated.voidsetAcquireIncrement(int acquireIncrement)Deprecated.voidsetAcquireRetryAttempts(int acquireRetryAttempts)Deprecated.voidsetAcquireRetryDelay(int acquireRetryDelay)Deprecated.voidsetAutoCommitOnClose(boolean autoCommitOnClose)Deprecated.voidsetAutomaticTestTable(java.lang.String automaticTestTable)Deprecated.voidsetBreakAfterAcquireFailure(boolean breakAfterAcquireFailure)Deprecated.voidsetCheckoutTimeout(int checkoutTimeout)Deprecated.voidsetConnectionTesterClassName(java.lang.String connectionTesterClassName)Deprecated.voidsetFactoryClassLocation(java.lang.String factoryClassLocation)Deprecated.voidsetForceIgnoreUnresolvedTransactions(boolean forceIgnoreUnresolvedTransactions)Deprecated.voidsetIdleConnectionTestPeriod(int idleConnectionTestPeriod)Deprecated.voidsetInitialPoolSize(int initialPoolSize)Deprecated.voidsetMaxIdleTime(int maxIdleTime)Deprecated.voidsetMaxPoolSize(int maxPoolSize)Deprecated.voidsetMaxStatements(int maxStatements)Deprecated.voidsetMaxStatementsPerConnection(int maxStatementsPerConnection)Deprecated.voidsetMinPoolSize(int minPoolSize)Deprecated.voidsetNumHelperThreads(int numHelperThreads)Deprecated.voidsetPreferredTestQuery(java.lang.String preferredTestQuery)Deprecated.voidsetPropertyCycle(int propertyCycle)Deprecated.voidsetTestConnectionOnCheckin(boolean testConnectionOnCheckin)Deprecated.voidsetTestConnectionOnCheckout(boolean testConnectionOnCheckout)Deprecated.voidsetUsesTraditionalReflectiveProxies(boolean usesTraditionalReflectiveProxies)Deprecated.
-
-
-
Field Detail
-
INITIAL_POOL_SIZE
public static final java.lang.String INITIAL_POOL_SIZE
Deprecated.- See Also:
- Constant Field Values
-
MIN_POOL_SIZE
public static final java.lang.String MIN_POOL_SIZE
Deprecated.- See Also:
- Constant Field Values
-
MAX_POOL_SIZE
public static final java.lang.String MAX_POOL_SIZE
Deprecated.- See Also:
- Constant Field Values
-
IDLE_CONNECTION_TEST_PERIOD
public static final java.lang.String IDLE_CONNECTION_TEST_PERIOD
Deprecated.- See Also:
- Constant Field Values
-
MAX_IDLE_TIME
public static final java.lang.String MAX_IDLE_TIME
Deprecated.- See Also:
- Constant Field Values
-
PROPERTY_CYCLE
public static final java.lang.String PROPERTY_CYCLE
Deprecated.- See Also:
- Constant Field Values
-
MAX_STATEMENTS
public static final java.lang.String MAX_STATEMENTS
Deprecated.- See Also:
- Constant Field Values
-
MAX_STATEMENTS_PER_CONNECTION
public static final java.lang.String MAX_STATEMENTS_PER_CONNECTION
Deprecated.- See Also:
- Constant Field Values
-
CHECKOUT_TIMEOUT
public static final java.lang.String CHECKOUT_TIMEOUT
Deprecated.- See Also:
- Constant Field Values
-
ACQUIRE_INCREMENT
public static final java.lang.String ACQUIRE_INCREMENT
Deprecated.- See Also:
- Constant Field Values
-
ACQUIRE_RETRY_ATTEMPTS
public static final java.lang.String ACQUIRE_RETRY_ATTEMPTS
Deprecated.- See Also:
- Constant Field Values
-
ACQUIRE_RETRY_DELAY
public static final java.lang.String ACQUIRE_RETRY_DELAY
Deprecated.- See Also:
- Constant Field Values
-
BREAK_AFTER_ACQUIRE_FAILURE
public static final java.lang.String BREAK_AFTER_ACQUIRE_FAILURE
Deprecated.- See Also:
- Constant Field Values
-
USES_TRADITIONAL_REFLECTIVE_PROXIES
public static final java.lang.String USES_TRADITIONAL_REFLECTIVE_PROXIES
Deprecated.- See Also:
- Constant Field Values
-
TEST_CONNECTION_ON_CHECKOUT
public static final java.lang.String TEST_CONNECTION_ON_CHECKOUT
Deprecated.- See Also:
- Constant Field Values
-
TEST_CONNECTION_ON_CHECKIN
public static final java.lang.String TEST_CONNECTION_ON_CHECKIN
Deprecated.- See Also:
- Constant Field Values
-
CONNECTION_TESTER_CLASS_NAME
public static final java.lang.String CONNECTION_TESTER_CLASS_NAME
Deprecated.- See Also:
- Constant Field Values
-
AUTOMATIC_TEST_TABLE
public static final java.lang.String AUTOMATIC_TEST_TABLE
Deprecated.- See Also:
- Constant Field Values
-
AUTO_COMMIT_ON_CLOSE
public static final java.lang.String AUTO_COMMIT_ON_CLOSE
Deprecated.- See Also:
- Constant Field Values
-
FORCE_IGNORE_UNRESOLVED_TRANSACTIONS
public static final java.lang.String FORCE_IGNORE_UNRESOLVED_TRANSACTIONS
Deprecated.- See Also:
- Constant Field Values
-
NUM_HELPER_THREADS
public static final java.lang.String NUM_HELPER_THREADS
Deprecated.- See Also:
- Constant Field Values
-
PREFERRED_TEST_QUERY
public static final java.lang.String PREFERRED_TEST_QUERY
Deprecated.- See Also:
- Constant Field Values
-
FACTORY_CLASS_LOCATION
public static final java.lang.String FACTORY_CLASS_LOCATION
Deprecated.- See Also:
- Constant Field Values
-
DEFAULT_CONFIG_RSRC_PATH
public static final java.lang.String DEFAULT_CONFIG_RSRC_PATH
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
defaultNumHelperThreads
public static int defaultNumHelperThreads()
Deprecated.
-
defaultPreferredTestQuery
public static java.lang.String defaultPreferredTestQuery()
Deprecated.
-
defaultFactoryClassLocation
public static java.lang.String defaultFactoryClassLocation()
Deprecated.
-
defaultMaxStatements
public static int defaultMaxStatements()
Deprecated.
-
defaultMaxStatementsPerConnection
public static int defaultMaxStatementsPerConnection()
Deprecated.
-
defaultInitialPoolSize
public static int defaultInitialPoolSize()
Deprecated.
-
defaultMinPoolSize
public static int defaultMinPoolSize()
Deprecated.
-
defaultMaxPoolSize
public static int defaultMaxPoolSize()
Deprecated.
-
defaultIdleConnectionTestPeriod
public static int defaultIdleConnectionTestPeriod()
Deprecated.
-
defaultMaxIdleTime
public static int defaultMaxIdleTime()
Deprecated.
-
defaultPropertyCycle
public static int defaultPropertyCycle()
Deprecated.
-
defaultCheckoutTimeout
public static int defaultCheckoutTimeout()
Deprecated.
-
defaultAcquireIncrement
public static int defaultAcquireIncrement()
Deprecated.
-
defaultAcquireRetryAttempts
public static int defaultAcquireRetryAttempts()
Deprecated.
-
defaultAcquireRetryDelay
public static int defaultAcquireRetryDelay()
Deprecated.
-
defaultBreakAfterAcquireFailure
public static boolean defaultBreakAfterAcquireFailure()
Deprecated.
-
defaultConnectionTesterClassName
public static java.lang.String defaultConnectionTesterClassName()
Deprecated.
-
defaultAutomaticTestTable
public static java.lang.String defaultAutomaticTestTable()
Deprecated.
-
defaultTestConnectionOnCheckout
public static boolean defaultTestConnectionOnCheckout()
Deprecated.
-
defaultTestConnectionOnCheckin
public static boolean defaultTestConnectionOnCheckin()
Deprecated.
-
defaultAutoCommitOnClose
public static boolean defaultAutoCommitOnClose()
Deprecated.
-
defaultForceIgnoreUnresolvedTransactions
public static boolean defaultForceIgnoreUnresolvedTransactions()
Deprecated.
-
defaultUsesTraditionalReflectiveProxies
public static boolean defaultUsesTraditionalReflectiveProxies()
Deprecated.
-
getNumHelperThreads
public int getNumHelperThreads()
Deprecated.
-
getPreferredTestQuery
public java.lang.String getPreferredTestQuery()
Deprecated.
-
getFactoryClassLocation
public java.lang.String getFactoryClassLocation()
Deprecated.
-
getMaxStatements
public int getMaxStatements()
Deprecated.
-
getMaxStatementsPerConnection
public int getMaxStatementsPerConnection()
Deprecated.
-
getInitialPoolSize
public int getInitialPoolSize()
Deprecated.
-
getMinPoolSize
public int getMinPoolSize()
Deprecated.
-
getMaxPoolSize
public int getMaxPoolSize()
Deprecated.
-
getIdleConnectionTestPeriod
public int getIdleConnectionTestPeriod()
Deprecated.
-
getMaxIdleTime
public int getMaxIdleTime()
Deprecated.
-
getPropertyCycle
public int getPropertyCycle()
Deprecated.
-
getAcquireIncrement
public int getAcquireIncrement()
Deprecated.
-
getCheckoutTimeout
public int getCheckoutTimeout()
Deprecated.
-
getAcquireRetryAttempts
public int getAcquireRetryAttempts()
Deprecated.
-
getAcquireRetryDelay
public int getAcquireRetryDelay()
Deprecated.
-
isBreakAfterAcquireFailure
public boolean isBreakAfterAcquireFailure()
Deprecated.
-
isUsesTraditionalReflectiveProxies
public boolean isUsesTraditionalReflectiveProxies()
Deprecated.
-
getConnectionTesterClassName
public java.lang.String getConnectionTesterClassName()
Deprecated.
-
getAutomaticTestTable
public java.lang.String getAutomaticTestTable()
Deprecated.
-
getTestConnectionOnCheckout
public boolean getTestConnectionOnCheckout()
Deprecated.use isTestConnectionOnCheckout
-
isTestConnectionOnCheckout
public boolean isTestConnectionOnCheckout()
Deprecated.
-
isTestConnectionOnCheckin
public boolean isTestConnectionOnCheckin()
Deprecated.
-
isAutoCommitOnClose
public boolean isAutoCommitOnClose()
Deprecated.
-
isForceIgnoreUnresolvedTransactions
public boolean isForceIgnoreUnresolvedTransactions()
Deprecated.
-
setNumHelperThreads
public void setNumHelperThreads(int numHelperThreads)
Deprecated.
-
setPreferredTestQuery
public void setPreferredTestQuery(java.lang.String preferredTestQuery)
Deprecated.
-
setFactoryClassLocation
public void setFactoryClassLocation(java.lang.String factoryClassLocation)
Deprecated.
-
setMaxStatements
public void setMaxStatements(int maxStatements)
Deprecated.
-
setMaxStatementsPerConnection
public void setMaxStatementsPerConnection(int maxStatementsPerConnection)
Deprecated.
-
setInitialPoolSize
public void setInitialPoolSize(int initialPoolSize)
Deprecated.
-
setMinPoolSize
public void setMinPoolSize(int minPoolSize)
Deprecated.
-
setMaxPoolSize
public void setMaxPoolSize(int maxPoolSize)
Deprecated.
-
setIdleConnectionTestPeriod
public void setIdleConnectionTestPeriod(int idleConnectionTestPeriod)
Deprecated.
-
setMaxIdleTime
public void setMaxIdleTime(int maxIdleTime)
Deprecated.
-
setPropertyCycle
public void setPropertyCycle(int propertyCycle)
Deprecated.
-
setCheckoutTimeout
public void setCheckoutTimeout(int checkoutTimeout)
Deprecated.
-
setAcquireIncrement
public void setAcquireIncrement(int acquireIncrement)
Deprecated.
-
setAcquireRetryAttempts
public void setAcquireRetryAttempts(int acquireRetryAttempts)
Deprecated.
-
setAcquireRetryDelay
public void setAcquireRetryDelay(int acquireRetryDelay)
Deprecated.
-
setConnectionTesterClassName
public void setConnectionTesterClassName(java.lang.String connectionTesterClassName)
Deprecated.
-
setAutomaticTestTable
public void setAutomaticTestTable(java.lang.String automaticTestTable)
Deprecated.
-
setBreakAfterAcquireFailure
public void setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure)
Deprecated.
-
setUsesTraditionalReflectiveProxies
public void setUsesTraditionalReflectiveProxies(boolean usesTraditionalReflectiveProxies)
Deprecated.
-
setTestConnectionOnCheckout
public void setTestConnectionOnCheckout(boolean testConnectionOnCheckout)
Deprecated.
-
setTestConnectionOnCheckin
public void setTestConnectionOnCheckin(boolean testConnectionOnCheckin)
Deprecated.
-
setAutoCommitOnClose
public void setAutoCommitOnClose(boolean autoCommitOnClose)
Deprecated.
-
setForceIgnoreUnresolvedTransactions
public void setForceIgnoreUnresolvedTransactions(boolean forceIgnoreUnresolvedTransactions)
Deprecated.
-
-