Author: ron.sigal(a)jboss.com
Date: 2009-04-30 17:33:06 -0400 (Thu, 30 Apr 2009)
New Revision: 5096
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/util/TimerUtil.java
Log:
JBREM-1112 (and others to be named): LeasePingerID, single ConnectionValidator per client
invoker.
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/util/TimerUtil.java
===================================================================
---
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/util/TimerUtil.java 2009-04-30
21:32:52 UTC (rev 5095)
+++
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/util/TimerUtil.java 2009-04-30
21:33:06 UTC (rev 5096)
@@ -35,7 +35,16 @@
}
//schedule at fixed delay (not rate)
- TimerUtil.timer.schedule(task, period, period);
+ try
+ {
+ TimerUtil.timer.schedule(task, period, period);
+ }
+ catch (IllegalStateException e)
+ {
+ log.debug("Unable to schedule TimerTask on existing Timer", e);
+ timer = new Timer(true);
+ timer.schedule(task, period, period);
+ }
}
public static synchronized void unschedule(TimerTask task)