[prev in list] [next in list] [prev in thread] [next in thread] 

List:       muse-user
Subject:    RE: subscribe expired notification
From:       Daniel Jemiolo <danjemiolo () us ! ibm ! com>
Date:       2007-05-07 17:02:43
Message-ID: OFEAD13C54.DD3711FA-ON872572D4.005D55B9-852572D4.005DB41D () us ! ibm ! com
[Download RAW message or body]

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\)" <vinguye2@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/ImmediateResourceT
> ermination</capability-uri>
> 
> <java-capability-class>org.apache.muse.ws.resource.lifetime.impl.SimpleI
> 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-imp
> 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\)" <vinguye2@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?
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic