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 "Vinh Nguyen (JIRA)" <ji...@apache.org> on 2007/05/08 21:47:15 UTC

[jira] Created: (MUSE-230) Notification not sent after subscription expires

Notification not sent after subscription expires
------------------------------------------------

                 Key: MUSE-230
                 URL: https://issues.apache.org/jira/browse/MUSE-230
             Project: Muse
          Issue Type: Bug
         Environment: Muse 2.2.0, JDK 1.5
            Reporter: Vinh Nguyen
         Assigned To: Dan Jemiolo
            Priority: Minor


When a subscription expires or is terminated, a notification is not being sent to the consumer about the event.

Below is the email thread:

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Monday, May 07, 2007 10:03 AM
To: muse-user@ws.apache.org
Subject: RE: subscribe expired notification

I think I know what the problem is... resources only send notifications if they have the NotificationProducer capability. Normally, this is fine (you can include the capability even if you don't want to expose its operations via WSDL), but this is a special case: if a subscription resource had NP, then you'd have an infinite recursion: subscriptions creating subscriptions about themselves.

The solution, I think, is for the NotificationProducer capability to use a ResourceManagerListener to wait for the destruction of subscriptions; when it finds that a subscription resource has been destroyed, it can send the notification itself. This should prevent any recursion. 

But since it's not doing this now, yes, it IS a bug we need to work on.

Dan


"Vinh Nguyen \(vinguye2\)" <vi...@cisco.com> wrote on 05/04/2007
09:08:15 PM:

> Thanks Dan,
> Yep, I think there's a bug.  Both my resource and SubscriptionManager 
> resource has this capability:
> 
>         <capability>
> 
> <capability-uri>http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourc
> eT
> ermination</capability-uri>
> 
> <java-capability-class>org.apache.muse.ws.resource.lifetime.impl.Simpl
> eI mmediateTermination</java-capability-class>
>         </capability>
> 
> But, when my client destroys either the resource or the 
> SubscriptionClient, the subscriber doesn't receive any notifications.
> Looking in the code, SimpleImmediateTermination.destroy() just calls 
> getResource().shutdown().  I can't find anywhere in the resource code 
> or its capabilities code that sends the actual termination notification.
> 
> If you can repeat this behavior, I can open a JIRA for this.
> 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Friday, May 04, 2007 11:33 AM
> To: muse-user@ws.apache.org
> Subject: Re: subscribe expired notification
> 
> You should be getting a WSRL termination notification IF the 
> subscription resource includes the WSRL capabilities. These 
> notifications should be no different than the termination 
> notifications for other ws-resource types.
> If a resource (subscription or otherwise) is destroyed and you don't 
> see a message on the WSRL termination topic, it's a bug. Here's the 
> code that enables this feature:
> 
> 
> http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsn-i
> mp 
> l/src/org/apache/muse/ws/notification/impl/SimpleNotificationProducer.
> ja
> va?revision=522022&view=markup
> 
> Specifically, look at the initializeCompleted() method:
> 
> //
> // if the resource supports either WS-RL capability, add support // 
> for the WS-RL termination topic // if
> (resource.hasCapability(WsrlConstants.IMMEDIATE_TERMINATION_URI) || 
>     resource.hasCapability(WsrlConstants.SCHEDULED_TERMINATION_URI))
>     addTopic(WsrlConstants.TERMINATION_TOPIC_QNAME);
> 
> 
> 
> "Vinh Nguyen \(vinguye2\)" <vi...@cisco.com> wrote on 05/04/2007
> 03:54:21 AM:
> 
> > I looked thru the WS-Notification specs, and it doesn't say anything 
> > about sending a notification to a subscriber when the subscription 
> > expires or is destroyed.  Does anyone know if this is a requirement?
> > When a resource instance is destroyed, Muse doesn't send a
> notification
> > about it.  Also, when the subscriptions are destroyed along with the 
> > resource, no notifications are sent either.
> > 
> > I assume these types of notifications are something we must 
> > implement, if it is not a WS-N or WS-RL requirement?




-- 
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