Timer Component is not Restartable
----------------------------------

                 Key: CAMEL-2751
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2751
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.2.0
            Reporter: Scott Cranton
         Attachments: TimerComponentRestart.patch

When the TimerComponent is stopped, it cancels all of the Timer instances it 
has created, which is good. However, TimerEndpoint keeps a local reference to 
the Timer instance, so if the TimerComponent is restarted, the TimerEndpoint 
will throw an exception as its timer is no longer usable as it has been 
canceled.

This patch provides a unit test, TimerRestartTest, and an update to 
TimerComponent that fixes this issue. The TimerComponent fix is to keep a list 
of all TimerEndpoints that have a reference to a Timer instance created by the 
TimerComponent. When TimerComponent.doStop is called, those TimerEndpoint 
references to the now canceled Timer instances are cleared.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to