You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Dan Jemiolo (JIRA)" <ji...@apache.org> on 2007/08/31 17:16:31 UTC

[jira] Updated: (MUSE-237) Cannot set subscription termination time if Subscribe was first called with null time

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

Dan Jemiolo updated MUSE-237:
-----------------------------

          Component/s: WSRF WSRL ScheduledTermination
        Fix Version/s: 2.3.0
    Affects Version/s: 2.2.0

> 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: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org