Class MysqlConnectionTester
java.lang.Object
com.mysql.cj.jdbc.integration.c3p0.MysqlConnectionTester
- All Implemented Interfaces:
com.mchange.v2.c3p0.ConnectionTester
,com.mchange.v2.c3p0.QueryConnectionTester
,java.io.Serializable
public final class MysqlConnectionTester
extends java.lang.Object
implements com.mchange.v2.c3p0.QueryConnectionTester
ConnectionTester for C3P0 connection pool that uses the more efficient COM_PING method of testing connection 'liveness' for MySQL, and 'sorts' exceptions
based on SQLState or class of 'CommunicationsException' for handling exceptions.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MysqlConnectionTester()
-
Method Summary
Modifier and Type Method Description int
activeCheckConnection(java.sql.Connection con)
int
activeCheckConnection(java.sql.Connection arg0, java.lang.String arg1)
int
statusOnException(java.sql.Connection arg0, java.lang.Throwable throwable)
-
Constructor Details
-
MysqlConnectionTester
public MysqlConnectionTester()
-
-
Method Details
-
activeCheckConnection
public int activeCheckConnection(java.sql.Connection con)- Specified by:
activeCheckConnection
in interfacecom.mchange.v2.c3p0.ConnectionTester
-
statusOnException
public int statusOnException(java.sql.Connection arg0, java.lang.Throwable throwable)- Specified by:
statusOnException
in interfacecom.mchange.v2.c3p0.ConnectionTester
-
activeCheckConnection
public int activeCheckConnection(java.sql.Connection arg0, java.lang.String arg1)- Specified by:
activeCheckConnection
in interfacecom.mchange.v2.c3p0.QueryConnectionTester
-