Hmmm. Let's remove the advertisement for a moment so we can see how to 
best fix your WSN problem. Are you saying you just want to create one 
event object and then update it (with setter methods) before each call to 
publish()? That will work, but depending on how often your events are 
happening, you could have some synchronization problems. I imagine what 
you'd really need is a clone() method for ManagementEvents (perhaps in a 
utility, so other implementors don't have to re-implement it).

The code you have should work - if you want, create the project w/ no 
advertisement and subscribe a client using no filter (to get all 
messages). If this doesn't work, put that project in JIRA and we'll track 
it down.

Dan



<[EMAIL PROTECTED]> wrote on 03/23/2007 01:23:16 PM:

> Hi guys
> 
> I was wondering how does the notificationproducer need to be implemented
> within the MyCapability.java in order for one to be able to update the
> situation events being sent out and being in charge of when these
> modified events are sent.
> 
> I was thinking something like:
> 
> public void publishWEFNotification(){
>        Situation situation = factory.createSituation();
> 
> situation.setCategoryType(WefConstants.AVAILABILITY_SITUATION_QNAME);
>        situation.setPriority(Situation.HIGH_PRIORITY);
>        situation.setMessage("Something important has happened! ");
>        event.setReporter(reporterComponent);
>        event.setSource(reporterComponent);
>        event.setSituation(situation);
> 
>        getLog().info("Sending message to consumers...");
>        try{
>           wsn.publish(_TOPIC_NAME, event);
>        }catch (Throwable error){
>           error.printStackTrace();
>        }
>     }
> 
> And then just calling the function whenever needed (perhaps added with
> some more parameters in the call later), but I don't seem to be able to
> get a WEF notification sent out. So far the only notifications I've had
> the framework provide with the WSDM implementation is the
> create/destruction (on change of property has been reported to jira).
> 
> /Lenni
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to