Class KeyedCPDSConnectionFactory

    • Field Detail

      • cpds

        private final javax.sql.ConnectionPoolDataSource cpds
      • validationQuery

        private final java.lang.String validationQuery
      • validationQueryTimeoutSeconds

        private final int validationQueryTimeoutSeconds
      • rollbackAfterValidation

        private final boolean rollbackAfterValidation
      • maxConnLifetimeMillis

        private long maxConnLifetimeMillis
      • validatingSet

        private final java.util.Set<javax.sql.PooledConnection> validatingSet
        Map of PooledConnections for which close events are ignored. Connections are muted when they are being validated.
      • pcMap

        private final java.util.Map<javax.sql.PooledConnection,​PooledConnectionAndInfo> pcMap
        Map of PooledConnectionAndInfo instances
    • Constructor Detail

      • KeyedCPDSConnectionFactory

        public KeyedCPDSConnectionFactory​(javax.sql.ConnectionPoolDataSource cpds,
                                          java.lang.String validationQuery,
                                          int validationQueryTimeoutSeconds,
                                          boolean rollbackAfterValidation)
        Create a new KeyedPoolableConnectionFactory.
        Parameters:
        cpds - the ConnectionPoolDataSource from which to obtain PooledConnections
        validationQuery - a query to use to validate Connections. Should return at least one row. May be null in which case3 Connection.isValid(int) will be used to validate connections.
        validationQueryTimeoutSeconds - The time, in seconds, to allow for the validation query to complete
        rollbackAfterValidation - whether a rollback should be issued after validating Connections.