snaq.db
Class AutoCommitValidator

java.lang.Object
  extended by snaq.db.AutoCommitValidator
All Implemented Interfaces:
ConnectionValidator

public final class AutoCommitValidator
extends Object
implements ConnectionValidator

Validates database connections by issuing a setAutoCommit(true) method call on the connection. This class is provided as a convenience for providing basic connection validation.

Author:
Giles Winstanley

Constructor Summary
AutoCommitValidator()
           
 
Method Summary
 boolean isValid(Connection con)
          Determines whether the specified connection is good to use.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoCommitValidator

public AutoCommitValidator()
Method Detail

isValid

public boolean isValid(Connection con)
                throws SQLException
Determines whether the specified connection is good to use.

Specified by:
isValid in interface ConnectionValidator
Parameters:
con - Connection instance to check for validity
Returns:
true if the specified connection is good to use, false otherwise
Throws:
SQLException