You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Bogdan Solomon <bs...@ncct.uottawa.ca> on 2007/06/12 21:54:23 UTC

WSDM Metric via Notification

This one has me blocked at the moment.

I have made a capability that I know can send information as a metric. I
have then modified this capability and added notifications to it, and I
tried sending the object as a notification. This also works now. So what I
would need to do next, is send the metric information attached to my
"object" through the notification. 

Is there anyway to do this, without having to construct the XML by hand?
Since I am publishing the notification, it does not seem to go through the
decoration layer that adds the metric metadata.
-- 
View this message in context: http://www.nabble.com/WSDM-Metric-via-Notification-tf3909596.html#a11085355
Sent from the Muse User mailing list archive at Nabble.com.


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


Re: WSDM Metric via Notification

Posted by Daniel Jemiolo <da...@us.ibm.com>.




you should be able to do this w/o modifying the WSN implementation - try
the instructions here:


http://www.ibm.com/developerworks/autonomic/library/ac-musemetric/index.html

Dan



Bogdan Solomon <bs...@ncct.uottawa.ca> wrote on 06/13/2007 02:08:51 PM:

>
> I think I solved this myself. I extended SimpleNotificationProducer and
> overwrote
>
> public void publish(QName topicName, Element[] content)
>
> to get the property collection, find in the read listeners for "content"
and
> then execute the readRequested on each of them. This works very nice and
the
> output XML (SOAP) is similar to what is obtained via
> getResourcePropertyAndMetrics. Once the new content is obtained I pass it
to
> super.publish().
>
> The only problem with this solution is that a publish is not exactly a
read,
> semantically.
>
>
> Bogdan Solomon wrote:
> >
> > This one has me blocked at the moment.
> >
> > I have made a capability that I know can send information as a metric.
I
> > have then modified this capability and added notifications to it, and I
> > tried sending the object as a notification. This also works now. So
what I
> > would need to do next, is send the metric information attached to my
> > "object" through the notification.
> >
> > Is there anyway to do this, without having to construct the XML by
hand?
> > Since I am publishing the notification, it does not seem to go through
the
> > decoration layer that adds the metric metadata.
> >
>
> --
> View this message in context: http://www.nabble.com/WSDM-Metric-via-
> Notification-tf3909596.html#a11105390
> Sent from the Muse User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>

Re: WSDM Metric via Notification

Posted by Bogdan Solomon <bs...@ncct.uottawa.ca>.
I think I solved this myself. I extended SimpleNotificationProducer and
overwrote 

public void publish(QName topicName, Element[] content)

to get the property collection, find in the read listeners for "content" and
then execute the readRequested on each of them. This works very nice and the
output XML (SOAP) is similar to what is obtained via
getResourcePropertyAndMetrics. Once the new content is obtained I pass it to
super.publish().

The only problem with this solution is that a publish is not exactly a read,
semantically.


Bogdan Solomon wrote:
> 
> This one has me blocked at the moment.
> 
> I have made a capability that I know can send information as a metric. I
> have then modified this capability and added notifications to it, and I
> tried sending the object as a notification. This also works now. So what I
> would need to do next, is send the metric information attached to my
> "object" through the notification. 
> 
> Is there anyway to do this, without having to construct the XML by hand?
> Since I am publishing the notification, it does not seem to go through the
> decoration layer that adds the metric metadata.
> 

-- 
View this message in context: http://www.nabble.com/WSDM-Metric-via-Notification-tf3909596.html#a11105390
Sent from the Muse User mailing list archive at Nabble.com.


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