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

    Fields inherited from interface com.mchange.v2.c3p0.ConnectionTester

    CONNECTION_IS_INVALID, CONNECTION_IS_OKAY, DATABASE_IS_INVALID
  • 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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.mchange.v2.c3p0.ConnectionTester

    equals, hashCode
  • Constructor Details

  • Method Details

    • activeCheckConnection

      public int activeCheckConnection​(java.sql.Connection con)
      Specified by:
      activeCheckConnection in interface com.mchange.v2.c3p0.ConnectionTester
    • statusOnException

      public int statusOnException​(java.sql.Connection arg0, java.lang.Throwable throwable)
      Specified by:
      statusOnException in interface com.mchange.v2.c3p0.ConnectionTester
    • activeCheckConnection

      public int activeCheckConnection​(java.sql.Connection arg0, java.lang.String arg1)
      Specified by:
      activeCheckConnection in interface com.mchange.v2.c3p0.QueryConnectionTester