WSN doesn't describe any way to do bulk subscription, not even in 
BrokeredNotification (with Brokered, you'd still have to tell the broker 
about all of the consumers so it could send out the messages it received). 
So yes, a custom capability would probably be necessary - just create a 
copy of Subscribe that allows for more than one ConsumerEPR, and then use 
code like this (error checking removed for brevity):


SubscriptionClient[] subscribe(EndpointReference[] consumers, Filter[] 
filters)
{
        NotificationProducer wsn = 
getResource().getCapability(WsnConstants.PRODUCER_URI);

        SubscriptionClient[] subscriptions = new 
SubscriptionClient[consumers.length];

        for (int n = 0; n < consumers.length; ++n)
                subscriptions[n] = wsn.subscribe(consumers[n], 
filters[n]);

        return subscriptions;
}



"Lloyd Smith" <[EMAIL PROTECTED]> wrote on 04/20/2007 04:27:20 AM:

> Our WSDM services will be managing quite a few objects - probably over a 

> thousand.  It looks like the subscribe request has to be a web service 
call 
> addressed to each managed object, which means that at consumer startup 
we're 
> looking at (worst case) one thousand service calls.  Before I implement 
some 
> kind of custom capability on the web service itself (taking a list of 
EPR's 
> and a consumer, and returning a list of subscription EPR's), I wanted to 
check
> that I'm not missing anything obvious here.  Thanks in advance.

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

Reply via email to