On Fri, Apr 18, 2008 at 9:18 AM, Ramkumar R <[EMAIL PROTECTED]> wrote:

> TUSCANY 1881, talks about throwing a warning msg when adding remote
> bindings
> to services with interfaces not marked as remotable, by which the data
> transformation might get messed up.
>
> From the current implementation, I understand that the datatransformation
> interceptor will not be inserted in the invocation chain if the target
> interface is not marked as remotable. Not having this interceptor will end
> up with binding specific data transformations not being done.. So unless
> the
> target binding does have any trouble with the arguments and returntypes
> because of the absence of transformations... we do not have any issues.
> But
> otherwise we might end up in runtime exceptions being thrown.
>
> While thinking at a solution to this issue, i could think of various
> options
> as shown below, but not sure which one is the right approach?
>
> OPTION 1: About issue shows how lack of Remotable ends up in runtime
> exception when service methods are invoked, can't we somehow trap this
> during component build or activatoin time itself?
>
> OPTION 2: I believe this whole thing can be solved if we can simply check
> in
> the binding if the interface is marked remote.
>
> OPTION 3: Currently DataBindingRuntimeWireProcessor.process() method
> checks
> if the source and target interfaces is remotable before it validates to
> see
> if data transformation is required. One way of solution to throw a warning
> msg is to check the source and target datatypes, if their datatypes are
> diff
> we assume that data transformation is required and we look if the
> interfaces
> are marked remotable, if not we throw a warning msg to alert that there
> could be an unexpected behaviour in data transformation.
>
> OPTION 4: In the DataBindingRuntimeWireProcessor.process() method, just
> check if the source and target interface is remotable OR if the source and
> target datatypes are different. If any one condition is satisfied then we
> assume that data transformation is required.
>
> Apart from the above mentioned issue, do we need to make such checks for
> ws
> binding as well OR do we need this checks for all kind of bindings. Like
> to
> know people's view on this regard. Thanks.
>
> --
> Thanks & Regards,
> Ramkumar Ramalingam
>

Hi Ramkumar

When I originally raised the JIRA I had imagined the solution would be your
OPTION 1. So that we get a warning that at least tells the user that they
are doing something odd. In my case it took me a while to work out what the
problem was so it would have been nice if the runtime had at least said "you
are dong something strange are you sure you want to do this".

I hadn't imagines that we could introduce a data transformation in this
case. Is there code in there that tries and optimizes away the remote
binding if it detects that the components are running locally?

Simon

Reply via email to