tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ant elder <ant.el...@gmail.com>
Subject Re: svn commit: r1302317 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
Date Wed, 21 Mar 2012 21:47:35 GMT
On Wed, Mar 21, 2012 at 9:01 PM, Raymond Feng <enjoyjava@gmail.com> wrote:
> Hi,
> This change breaks the case where we use @target in the <reference> element to
wire components using non-SCA bindings. For example, the RESTBindingInvoker uses the binding.uri
to find out the target address. Since now it's a clone, the value won't be updated when the
service binding set the deployed URI.
> A better fix is to retrieve the deployed URI from the target endpoint.

I agree its irksome that simple local @target references can't rely on
getting the service url set after its wired up but really that seems
like it was only working previously by relying on the bug that the
objects were shared.

Getting the URI from the target endpoint isn't going to solve all the
other problems that can happen when the Binding object is shared, the
problem is that what information within a Binding can or can't be
shared between the Endpoint and EndpointReference is difficult to
determine and varies across binding impls - policy, databindings,
really any of the binding fields - getting set by one side can easily
overwrite what the other end had previously set.

I can't yet see a better way to fix this than cloning the binding
here. What about trying to fix the deployed service URI getting passed
on to the reference by doing something with the EndpointRegistry so
that setting the deployed URI on the service Endpoint in there gets
its replicated to the reference side?


View raw message