
com.mchange.v2.c3p0.ConnectionTester Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.apache.servicemix.bundles.c3p0
Show all versions of org.apache.servicemix.bundles.c3p0
This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.
package com.mchange.v2.c3p0;
import java.io.Serializable;
import java.sql.Connection;
/**
* Define your own Connection tester if you want to
* override c3p0's default behavior for testing the validity
* of Connections and responding to Connection errors encountered.
*
* Recommended: If you'd like your ConnectionTester
* to support the user-configured preferredTestQuery
* parameter, please implement {@link com.mchange.v2.c3p0.UnifiedConnectionTester}.
*
*
ConnectionTesters should be Serializable, immutable,
* and must have public, no-arg constructors.
*
* @see com.mchange.v2.c3p0.UnifiedConnectionTester
* @see com.mchange.v2.c3p0.AbstractConnectionTester
*/
public interface ConnectionTester extends Serializable
{
public final static int CONNECTION_IS_OKAY = 0;
public final static int CONNECTION_IS_INVALID = -1;
public final static int DATABASE_IS_INVALID = -8;
public int activeCheckConnection(Connection c);
public int statusOnException(Connection c, Throwable t);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy