On Fri, Feb 13, 2009 at 5:08 PM, Simon Nash <[email protected]> wrote:

> Simon Laws wrote:
>
>
>>
>> On Fri, Feb 13, 2009 at 12:19 PM, Simon Nash <[email protected] <mailto:
>> [email protected]>> wrote:
>>
>>    Simon Laws wrote:
>>
>>        Around line 155 of DataBindingRuntimeWireProcessor there is the
>> code
>>
>>                       // assume pass-by-values copies are required if
>>        interfaces are remotable and there is no data binding
>>                       // transformation, i.e. a transformation will
>>        result in a copy so another pass-by-value copy is unnecessary
>>                       if (!isOnMessage(targetOperation) &&
>>        isRemotable(chain, sourceOperation, targetOperation)) {
>>                           interceptor =
>>                               new PassByValueInterceptor(dataBindings,
>>        faultExceptionMapper, chain, targetOperation);
>>                       }
>>
>>        We should only be doing this if binding.sca is being used.
>>
>>        TUSCANY-2586 records this problem but there seems to be some
>>        question as to the solution. Why can't we check here what type
>>        of binding is being used? Iassuming that that approach was
>>        discounted.
>>
>>        Simon
>>
>>     >
>>    It isn't safe to assume that all bindings other than binding.sca
>>    force copies to be made.  A user could write binding.foo that
>>    works similarly to binding.sca in that it doesn't do copies on
>>    local invocations.
>>
>>    The solution proposed in the discussion of TUSCANY-2586 solves
>>    this problem by making every binding responsible for deciding
>>    whether the copying needs to be done.
>>
>>     Simon
>>
>>
>>
>> Ok, good point. My thought was also rubbish as binding.sca doesn't always
>> need the PBV interceptor:-(
>>
>> So we need a new binding operation to ask the question whether a copy is
>> required. In the binding.sca case it needs to take account of whether it's
>> operating in local or remote mode.
>>
>> Simon
>>
> >
> It's already possible for bindings to add an interceptor to the
> chain.  If the binding needs a copy, it can add the interceptor.
> The binding might also need to consult the provider implementation
> to see if @AllowsPassByReference is set.
>
>  Simon
>
>
Yes, you can add it manually as it were. But the point I'm pushing on is
whether we need an SPI to explicitly give binding providers a place where
they can add invokers to the wire chains. We have added such a place for the
binding wire work and we could look at rationalizing that if this fits
there.

Simon

Reply via email to