Class PoolConfig


  • public final class PoolConfig
    extends java.lang.Object
    Deprecated.
    as of c3p0-0.9.1. To manipulate config programmaticall, please use ComboPooledDataSource

    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.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:

    1. Any property can be set explicitly by calling the corresponding method on a PoolConfig object.
    2. Any property will default to a value defined by a System Property, using the property name shown the table below.
    3. 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.
    4. 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 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
    • Constructor Detail

      • PoolConfig

        public PoolConfig​(java.util.Properties props)
                   throws java.lang.NumberFormatException
        Deprecated.
        Throws:
        java.lang.NumberFormatException
      • PoolConfig

        public PoolConfig()
                   throws java.lang.NumberFormatException
        Deprecated.
        Throws:
        java.lang.NumberFormatException
    • 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.