public class JUnitConnectionErrorCheckingJDBCConnectionPool extends ConnectionErrorCheckingJDBCConnectionPool implements JUnitJDBCConnectionPool
| Constructor and Description |
|---|
JUnitConnectionErrorCheckingJDBCConnectionPool(JUnitJDBCConnectionFactory factory,
GenericObjectPoolConfig cfg,
JUnitConnectionStatus connectionStatus) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFailingConnection(java.sql.Connection con)
Allows manually marking a connection to fail validation upon next
JDBCConnectionPool.returnConnection(Connection). |
protected boolean |
mayTestAgain(int intervalSeconds)
Don't wait for testing.
|
boolean |
mustValidate(java.sql.Connection con) |
void |
removeFailingConnection(java.sql.Connection con)
Removes a connection from failing set.
|
void |
resetTestMode() |
void |
setAllConnectionsFail(boolean allFail)
Allows to manually cause all connections to fail upon validate.
|
void |
setPoolHasConnectionErrors(boolean hasErrors)
Allows manual activating / deActivating of connection error flag held by his pool.
|
borrowConnection, cannotConnectclose, disableOracleStatementCaching, enableOracleStatementCaching, getMaxActive, getMaxPhysicalOpen, getNumActive, getNumIdle, getNumPhysicalOpen, invalidateConnection, isPoolClosed, resetOracleStatementCaching, resetStats, returnConnection, setDumpStackOnConnectionError, toStringpublic JUnitConnectionErrorCheckingJDBCConnectionPool(JUnitJDBCConnectionFactory factory, GenericObjectPoolConfig cfg, JUnitConnectionStatus connectionStatus)
public boolean mustValidate(java.sql.Connection con)
public void setPoolHasConnectionErrors(boolean hasErrors)
hasErrors - public void addFailingConnection(java.sql.Connection con)
JDBCConnectionPool.returnConnection(Connection).addFailingConnection in interface JUnitJDBCConnectionPoolcon - public void removeFailingConnection(java.sql.Connection con)
removeFailingConnection in interface JUnitJDBCConnectionPoolcon - addFailingConnection(Connection)public void setAllConnectionsFail(boolean allFail)
setAllConnectionsFail in interface JUnitJDBCConnectionPoolallFail - public void resetTestMode()
resetTestMode in interface JUnitJDBCConnectionPoolprotected boolean mayTestAgain(int intervalSeconds)
mayTestAgain in class ConnectionErrorCheckingJDBCConnectionPoolCopyright © 2018 SAP SE. All Rights Reserved.