i-net JDBC drivers for MS SQL Server

com.inet.pool
Interface FailoverListener

All Superinterfaces:
java.util.EventListener

public interface FailoverListener
extends java.util.EventListener


Method Summary
 boolean handleFailoverEvent(FailoverEvent e)
          This method will be invoked for the first time if a Connection interrupt was detected.
 

Method Detail

handleFailoverEvent

boolean handleFailoverEvent(FailoverEvent e)
This method will be invoked for the first time if a Connection interrupt was detected. The timestamp of detection is usualy on try to execute a Statement. On the first call the FailoverEvent is from type FailoverEvent.FO_BEGIN. In depending on the return value of this method, it will be attempt to restore the Connection. If true was returned, the next FailoverEvent either has the type FO_END or FO_ERROR.
FO_END indicates that the Connection was succesfully restored and all Statements, PreparedStatements and CallableStatements created from the Connection also were restored succesfully. The return value of this method has here no effect. The ResultSets of a Statement won't be restored. The Statemnt has to be executed again.
FO_ERROR indicates that the attempt of restoring the Connection failed. The reasons for that can be multifaced. The most common reasons are: Database service is not running, database shutdown or startup is in progress. Return here true if you want to try restoring the Connection again.

Parameters:
e - the Event containing information about the failover state.
Returns:
true to start the try of restore the Connection and all theire Statements;
false to break the try of restore the Connection.
See Also:
FailoverEvent, FailoverEvent.getEventType(), FailoverEvent.getException(), PoolManager.addFailoverListener(com.inet.pool.FailoverListener, java.sql.Connection)

i-net JDBC drivers for MS SQL Server


copyright by i-net software