Package de.hybris.platform.jdbcwrapper
Class ConnectionErrorCheckingJDBCConnectionPool
java.lang.Object
de.hybris.platform.jdbcwrapper.JDBCConnectionPool
de.hybris.platform.jdbcwrapper.ConnectionErrorCheckingJDBCConnectionPool
- Direct Known Subclasses:
JUnitConnectionErrorCheckingJDBCConnectionPool
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionErrorCheckingJDBCConnectionPool(JDBCConnectionFactory factory, org.apache.commons.pool2.impl.GenericObjectPoolConfig cfg, ConnectionStatus connectionStatus) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConnectionborrowConnection(int retries) booleanprotected ConnectionintGets the amount of retries when borrowing a new connection.protected booleanmayTestAgain(int intervalSeconds) setConnectRetries(int connectRetries) Sets the amount of retries when borrowing a new connection.Methods inherited from class de.hybris.platform.jdbcwrapper.JDBCConnectionPool
close, disableOracleStatementCaching, enableOracleStatementCaching, getMaxActive, getMaxPhysicalOpen, getNumActive, getNumIdle, getNumPhysicalOpen, getNumReadOnlyOpen, invalidateConnection, isPoolClosed, resetOracleStatementCaching, resetStats, returnConnection, setDumpStackOnConnectionError, toString
-
Constructor Details
-
ConnectionErrorCheckingJDBCConnectionPool
public ConnectionErrorCheckingJDBCConnectionPool(JDBCConnectionFactory factory, org.apache.commons.pool2.impl.GenericObjectPoolConfig cfg, ConnectionStatus connectionStatus)
-
-
Method Details
-
cannotConnect
public boolean cannotConnect()- Overrides:
cannotConnectin classJDBCConnectionPool
-
borrowConnection
- Overrides:
borrowConnectionin classJDBCConnectionPool- Throws:
Exception
-
borrowConnection
- Throws:
Exception
-
doBorrowConnection
- Throws:
Exception
-
mayTestAgain
protected boolean mayTestAgain(int intervalSeconds) -
setConnectRetries
Sets the amount of retries when borrowing a new connection.- Parameters:
connectRetries- the connectRetries to set- Returns:
thisinstance 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.
-