[ 
https://issues.apache.org/jira/browse/MUSE-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Jemiolo closed MUSE-237.
----------------------------

    Resolution: Fixed

Fixed bug by making suggested change to org.apache.muse.util.Timer

> Cannot set subscription termination time if Subscribe was first called with 
> null time
> -------------------------------------------------------------------------------------
>
>                 Key: MUSE-237
>                 URL: https://issues.apache.org/jira/browse/MUSE-237
>             Project: Muse
>          Issue Type: Bug
>          Components: WSRF WSRL ScheduledTermination
>    Affects Versions: 2.2.0
>         Environment: Muse 2.2.0, Eclipse 3.2.1
>            Reporter: Vinh Nguyen
>            Assignee: Dan Jemiolo
>             Fix For: 2.3.0
>
>         Attachments: SimpleScheduledTermination.java
>
>
> I initially subscribe with no expiration date.  This means the subscription 
> lifetime is indefinite.  But later, when I try to call the 
> setTerminationTime() to give the subscription a specific expiration date, I 
> get the following error:
> org.apache.muse.ws.addressing.soap.SoapFault: Timer already cancelled.
>       at 
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:298)
>       at 
> com.cisco.nm.cmp.nbi.wsdm.client.core.SubscriptionClient.invoke(SubscriptionClient.java:126)
>       at 
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
>       at 
> org.apache.muse.ws.resource.remote.WsResourceClient.setTerminationTime(WsResourceClient.java:187)
> The error is in SimpleScheduledTermination line #114. 
> The SimpleNotificationProducer.subscribe() is invoked by the client with a 
> null expiration date.  This creates the SimpleScheduledTermination instance 
> and calls setTerminationTime(null), which cancels the internal timer.  Later, 
> when setTerminationTime() is called with a valid date, the Timer throws an 
> error because a task is trying to be scheduled on it, but the timer already 
> was cancelled.
> The simplest fix is to set a flag so that if the timer was initially 
> cancelled, reinstantiate it when it's used again.  The flag can be set in 
> SimpleScheduledTermination time.  Or better, create it in 
> org.apache.muse.util.Timer so that you know if it was cancelled, and check 
> this flag in SimpleScheduledTermination.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to