ws-muse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohammad Fakhar (JIRA)" <>
Subject [jira] Created: (MUSE-154) reschedule method of Timer utility in Muse will give illegal state exceptions
Date Thu, 30 Nov 2006 02:30:21 GMT
reschedule method of Timer utility in Muse will give illegal state exceptions

                 Key: MUSE-154
             Project: Muse
          Issue Type: Bug
          Components: Utilities - General, QName, and XML
    Affects Versions: 2.0.0, 2.1.0
         Environment: any
            Reporter: Mohammad Fakhar
         Assigned To: Dan Jemiolo
            Priority: Minor

The reschedule method of Timer utility gives the following error upon execution:
java.lang.IllegalStateException: Task already scheduled or cancelled
	at java.util.Timer.sched(
	at java.util.Timer.schedule(

Here is the scenario:

1) I schedule a resource for termination at time X using the scheduled life time capability.
2) 5 seconds later, I re-schedule the same resource for termination at time Y (where Y is
> X).
3) The lifetime capabilites use the Timer utility underneath the covers and upon rescheduling,
the reschedule
method is called in SimpleScheduledTermination implementation: _terminationTimer.reschedule(time);

4) The reschedule method cancels the task, creates a new instance of a timer and schedules
the SAME instance of the task with the new timer:
Timer.reschedule {
        _timer = new java.util.Timer();

Timer.schedule {
        _timer.schedule(_task, whenToFire);


5) Now, java.util.Timer doesn't allow you to schedule the same instance of a previously cancelled
task EVEN with a new timer instance (I experimented with it on the side). This is not explicit
in the jdk javadoc, but it won't allow you to do this. Not sure if this should be a jdk bug
or not, but I thought I would get it documented here at least. 

6) this problem will surface whenever Muse implements the WS-N Renew function.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message