Hi,
Chris is correct.  Jan, I think what you are looking for is a resource which 
creates other producer resources.  In this case, you need to create a custom 
resource (i.e. call it FactoryService) which exposes some operation (i.e. 
createProducer()).  You also need another custom resource that implements 
wsn:NotificationProducer (i.e. call it ProducerResource).

So when FactoryService.createProducer() is called, it must dynamically create a 
new instance of ProducerResource and pass the EPR back to the client.  Then the 
client can Subscribe/Unsubscribe directly on that new ProducerResource instance.

This follows the facade pattern.  Take a look at the "wsrf" sample which does 
something similar.

Hope this helps...
-Vinh
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 15, 2008 7:15 AM
To: [email protected]
Subject: RE: Dynamically register notification producers

Hi, 

If the producers have the same interface for the resource they represent then I 
believe that is what you want.

A Muse SubscriptionManager simply handles subscriptions for a given producer, 
it can't create new producers.  Each new producer would require a resource to 
go against it, hence the proxy link I sent.  Unless I have completely missed 
want you want (which is always possible) I would suggest:

- create a simple resource type that meets all of your needs for your dynamic 
producers
- create a simple resource factory, as per the link, which exposes register, 
cancel and renew of producers (see pullpoint for an example on how this works)
        - register creates a new resource and registers its epr with the 
resource router
        - cancel removes that resource (and any linked subscriptions) from the 
resource router

Unfortunately I can't guess what renew means in this context.  (perhaps 
canceled producers are merely inactive?).

Re the trunk change this is truly only interesting if you are planning on 
having different interfaces for your resources.

cheers,
Chris

-----Original Message-----
From: Jan Torben Heuer [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 15, 2008 3:45 PM
To: [email protected]
Subject: Re: Dynamically register notification producers

On Wednesday 14 May 2008 17:11:28 [EMAIL PROTECTED] wrote:

Hi,

> It depends on wether they will be instances of the same resource type 
> or are meant to be seperate types.  You can already create multiple 
> producers
They are different Producers with different Topics

> by just creating a new instance of an existing resource.  If you want 
> a large number of instances it is perhaps better to use the proxying 
> technique (found here
> http://www.ibm.com/developerworks/autonomic/library/ac-muse.html) but 
> this promotes problems for subscriptions.  If the latter link is an 
> interesting approach for you then I an send some code to publish to 
> the correct NotificationProducer when working with proxies.
Hmm, I think it is not really what I need.

I want to create a SOAP interface like the SubscriptionManager has to allow 
register, cancel and renew of producers.

> If its creating seperate types of resources at runtime then there is 
> no support for it that I know off (although similar support is 
> scheduled for 2.3).
Is there already somethink in trunk?

Jan
-- 
Jan Torben Heuer                Institute for Geoinformatics
[EMAIL PROTECTED]       Robert-Koch-Strasse 26-28
+49 251 83-31960                48151 Münster, Germany

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