All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mchange.v2.c3p0.ConnectionTester Maven / Gradle / Ivy

There is a newer version: 0.9.5.2_1
Show newest version
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