org.jboss.jca.adapters.jdbc.extensions.mysql

## Class MySQLReplicationValidConnectionChecker

- java.lang.Object
- - org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLReplicationValidConnectionChecker

- All Implemented Interfaces:
    java.io.Serializable, ValidConnectionChecker

      public class MySQLReplicationValidConnectionChecker
      extends java.lang.Object
      implements ValidConnectionChecker, java.io.Serializable

  This class is an implementation of ValidConnectionChecker for MySQL ReplicatedDriver. It supports both isValid and ping methods on the connection object.

  Please note that the isValid method requires java 6 classes to be present.

  The code was inspired by MySQLValidConnectionChecker. See it's javadoc for authors info. This code is released under the LGPL license.

  Author:
    Luc Boudreau (lucboudreau att gmail dott com)
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MySQLReplicationValidConnectionChecker()` Initiates the ValidConnectionChecker implementation.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.sql.SQLException` | `isValidConnection(java.sql.Connection c)` Checks the connection is valid

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### MySQLReplicationValidConnectionChecker

          public MySQLReplicationValidConnectionChecker()

      Initiates the ValidConnectionChecker implementation.

  - ### Method Detail

    - #### isValidConnection

          public java.sql.SQLException isValidConnection(java.sql.Connection c)

      Checks the connection is valid
      Specified by:
        `isValidConnection` in interface `ValidConnectionChecker`
      Parameters:
        `c` - the connection
      Returns:
        Exception when not valid, null when valid

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)