Class MySQLReplicationValidConnectionChecker
- java.lang.Object
-
- org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLReplicationValidConnectionChecker
-
- All Implemented Interfaces:
Serializable,ValidConnectionChecker
public class MySQLReplicationValidConnectionChecker extends Object implements ValidConnectionChecker, 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 Description MySQLReplicationValidConnectionChecker()Initiates the ValidConnectionChecker implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SQLExceptionisValidConnection(Connection c)Checks the connection is valid
-
-
-
Method Detail
-
isValidConnection
public SQLException isValidConnection(Connection c)
Checks the connection is valid- Specified by:
isValidConnectionin interfaceValidConnectionChecker- Parameters:
c- the connection- Returns:
- Exception when not valid, null when valid
-
-