Class ExternalConnectionPool


  • public class ExternalConnectionPool
    extends ConnectionPool

    Purpose: This subclass is intended to be used with external connection pools. For these pools, TopLink does not control the pooling behavior. The login should have the usesExternalConnectionPooling set to "true".

    • Field Detail

      • cachedConnection

        protected org.eclipse.persistence.internal.databaseaccess.Accessor cachedConnection
    • Constructor Detail

      • ExternalConnectionPool

        public ExternalConnectionPool()
        PUBLIC: Build a new external connection pool. The JDBC driver is responsible for pooling the connections.
      • ExternalConnectionPool

        public ExternalConnectionPool​(java.lang.String name,
                                      Login login,
                                      ServerSession owner)
        PUBLIC: Build a new external connection pool. The JDBC driver is responsible for pooling the connections.
    • Method Detail

      • getCachedConnection

        protected org.eclipse.persistence.internal.databaseaccess.Accessor getCachedConnection()
        INTERNAL: Return the currently cached connection to the external connection pool
        Returns:
        org.eclipse.persistence.internal.databaseaccess.Accessor
      • hasConnectionAvailable

        public boolean hasConnectionAvailable()
        INTERNAL: Assume true as the driver is responsible for blocking.
        Overrides:
        hasConnectionAvailable in class ConnectionPool
      • setCachedConnection

        protected void setCachedConnection​(org.eclipse.persistence.internal.databaseaccess.Accessor cachedConnection)
        Set the currently cached connection to the external connection pool.
        Parameters:
        cachedConnection -
      • setCheckConnections

        public void setCheckConnections()
        INTERNAL: This method is called to indicate that all available connections should be checked. Noop on external connection pool.
        Overrides:
        setCheckConnections in class ConnectionPool
      • shutDown

        public void shutDown()
        INTERNAL: This mehtod is a no-op for external pools.
        Overrides:
        shutDown in class ConnectionPool
      • startUp

        public void startUp()
        INTERNAL: Build the default connection. This validates that connect will work and sets up the parent accessor to clone.
        Overrides:
        startUp in class ConnectionPool