mysql
Class StaticSql.ReconnectTask

java.lang.Object
  extended by java.util.TimerTask
      extended by mysql.StaticSql.ReconnectTask
All Implemented Interfaces:
Runnable
Enclosing class:
StaticSql

private static final class StaticSql.ReconnectTask
extends TimerTask

A reconnect task first deletes any pending statements and then tries to reopen it in its run method.


Field Summary
private  int count
          Retry-counter for debugging.
private  String password
          The password for the user.
private  String user
          The user name for the db connection.
 
Constructor Summary
private StaticSql.ReconnectTask(String whom, String how)
          Tries to close any pending statement on the old user entry and re-opens the connection in its run method.
 
Method Summary
 void run()
          Tries to re-open the connection for the user with the given password If successful, we cancel ourself.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

user

private String user
The user name for the db connection.


password

private String password
The password for the user.


count

private int count
Retry-counter for debugging.

Constructor Detail

StaticSql.ReconnectTask

private StaticSql.ReconnectTask(String whom,
                                String how)
Tries to close any pending statement on the old user entry and re-opens the connection in its run method.

Method Detail

run

public void run()
Tries to re-open the connection for the user with the given password If successful, we cancel ourself. We never try to re-create the statement, only the connection is tried.

Specified by:
run in interface Runnable
Specified by:
run in class TimerTask