Class ConnectionErrorCheckingJDBCConnectionPool

java.lang.Object
de.hybris.platform.jdbcwrapper.JDBCConnectionPool
de.hybris.platform.jdbcwrapper.ConnectionErrorCheckingJDBCConnectionPool
Direct Known Subclasses:
JUnitConnectionErrorCheckingJDBCConnectionPool

public class ConnectionErrorCheckingJDBCConnectionPool extends JDBCConnectionPool
  • Constructor Details

    • ConnectionErrorCheckingJDBCConnectionPool

      public ConnectionErrorCheckingJDBCConnectionPool(JDBCConnectionFactory factory, org.apache.commons.pool2.impl.GenericObjectPoolConfig cfg, ConnectionStatus connectionStatus)
  • Method Details

    • cannotConnect

      public boolean cannotConnect()
      Overrides:
      cannotConnect in class JDBCConnectionPool
    • borrowConnection

      public Connection borrowConnection() throws Exception
      Overrides:
      borrowConnection in class JDBCConnectionPool
      Throws:
      Exception
    • borrowConnection

      protected Connection borrowConnection(int retries) throws Exception
      Throws:
      Exception
    • doBorrowConnection

      protected Connection doBorrowConnection() throws Exception
      Throws:
      Exception
    • mayTestAgain

      protected boolean mayTestAgain(int intervalSeconds)
    • setConnectRetries

      public ConnectionErrorCheckingJDBCConnectionPool setConnectRetries(int connectRetries)
      Sets the amount of retries when borrowing a new connection.
      Parameters:
      connectRetries - the connectRetries to set
      Returns:
      this instance for method chaining.
    • getConnectRetries

      public int getConnectRetries()
      Gets the amount of retries when borrowing a new connection.
      Returns:
      the connectRetries amount of retries when borrowing a connection.