com.inet.pool
Interface FailoverRunnable
- public interface FailoverRunnable
The FailoverRunnable interface should be implemented by any class whose instances
are intended to be executed with a Cluster and should have a failover.
The class must define a method with one argument called run.
|
Method Summary |
void |
run(java.sql.Connection con)
This method needs to be implemented if you want to use the Cluster failover feature
of the PoolManager.
|
run
public void run(java.sql.Connection con)
throws java.sql.SQLException
- This method needs to be implemented if you want to use the Cluster failover feature
of the PoolManager.
In this method you should not use the following methods:
- setAutoCommit(boolean)
- commit()
- rollback()
because they are being used by the method executeFailover.
This method can executed repeatedly and rolled back subsequently. At first you should reset all modified
objects. For example if you have a stream for an html page then you should reset
the stream first. In case of a failover the html page be written repeatedly to the stream.
- See Also:
PoolManager.executeFailover(javax.sql.ConnectionPoolDataSource, com.inet.pool.FailoverRunnable),
PoolManager.setFailoverCount(int),
PoolManager.setFailoverTimeout(int)
copyright by i-net software