Class C3p0PoolingConnectionProvider

    • Field Detail

      • DB_MAX_CACHED_STATEMENTS_PER_CONNECTION

        public static final java.lang.String DB_MAX_CACHED_STATEMENTS_PER_CONNECTION
        The maximum number of prepared statements that will be cached per connection in the pool. Depending upon your JDBC Driver this may significantly help performance, or may slightly hinder performance. Default is 120, as Quartz uses over 100 unique statements. 0 disables the feature.
        See Also:
        Constant Field Values
      • DB_IDLE_VALIDATION_SECONDS

        public static final java.lang.String DB_IDLE_VALIDATION_SECONDS
        The number of seconds between tests of idle connections - only enabled if the validation query property is set. Default is 50 seconds.
        See Also:
        Constant Field Values
      • DB_VALIDATE_ON_CHECKOUT

        public static final java.lang.String DB_VALIDATE_ON_CHECKOUT
        Whether the database sql query to validate connections should be executed every time a connection is retrieved from the pool to ensure that it is still valid. If false, then validation will occur on check-in. Default is false.
        See Also:
        Constant Field Values
      • DB_DISCARD_IDLE_CONNECTIONS_SECONDS

        public static final java.lang.String DB_DISCARD_IDLE_CONNECTIONS_SECONDS
        Discard connections after they have been idle this many seconds. 0 disables the feature. Default is 0.
        See Also:
        Constant Field Values
      • DEFAULT_DB_MAX_CACHED_STATEMENTS_PER_CONNECTION

        public static final int DEFAULT_DB_MAX_CACHED_STATEMENTS_PER_CONNECTION
        Default maximum number of database connections in the pool.
        See Also:
        Constant Field Values
    • Method Detail

      • getDataSource

        public com.mchange.v2.c3p0.ComboPooledDataSource getDataSource()
        Get the C3PO ComboPooledDataSource created during initialization.

        This can be used to set additional data source properties in a subclass's constructor.

        Specified by:
        getDataSource in interface PoolingConnectionProvider
      • getConnection

        public java.sql.Connection getConnection()
                                          throws java.sql.SQLException
        Specified by:
        getConnection in interface ConnectionProvider
        Returns:
        connection managed by this provider
        Throws:
        java.sql.SQLException
      • shutdown

        public void shutdown()
                      throws java.sql.SQLException
        Specified by:
        shutdown in interface ConnectionProvider
        Throws:
        java.sql.SQLException
      • initialize

        public void initialize()
                        throws java.sql.SQLException
        Specified by:
        initialize in interface ConnectionProvider
        Throws:
        java.sql.SQLException