You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Roberto Cappa <ca...@gmail.com> on 2009/09/23 16:48:47 UTC

Runtime change of a WS binding from Java code

Any news about this problem?

Re: Runtime change of a WS binding from Java code

Posted by Simon Laws <si...@googlemail.com>.
Hi Roberto

In a funny way yes, although not in the direction I was originally thinking.

In our 2.x code base we have instigated a registry (can be a
distributed registry) that holds all of the endpoints that are
available to the tuscany runtime.
We also now have a test that allows us to start composite A which has
a component wired to a component in composite B. Composite B can be
stopped, moved to a different machine and restarted and composite A
will be able to find it automatically.

You scenario has similar feel to it as this. The difference is that in
your case you rely on the target endpoint being set programmatically
rather than having the runtime detect that the endpoint is no longer
available at it's original location.

So we could potentially write a service that

1/ populates the registry with the correct endpoint information as
provided at configuration time
2/ sets the reference in question to reset itself when the endpoint changes.

Still not as straightforward as you were thinking of, i.e. just being
able to reset the URL on the ws binding. That is because the SCA
programming model doesn't support any APIs for these kind of
programmatic changes to the run time. However we will likely have to
cater for more dynamic scenarios at some point so thinking these kinds
of thoughts is useful. I know Raymond has also been looking at dynamic
scenarios in the context of the OSGi support he's looking at.

I could give this a spin and see if works.

Remind me, was there a JIRA to track this?

Simon