This question is especially for Raymond,

In trying to invoke the mediator from a service-side binding impl, I have a
need to get the wireTarget operation (to pass to the mediator).

I was wondering what the downside would be of caching the operation from the
service contract which I'd get in the same way we get
the wireTarget contract on the service side:

        // FIXME: [rfeng] We might need a better way to get the impl
interface contract
        Service targetService = service.getService();
        if (targetService == null) {
            targetService = service;
        }
        InterfaceContract targetContract =
targetService.getInterfaceContract().makeUnidirectional(false);

Now... we do the analogous thing on the reference side to build the
wireSource contract.   Is there some significant difference that
makes this more complicated on the service side, or does one just happen to
have a FIXME on it but not the other.

Just curious if anyone knew that maybe there is some gotcha or issue lurking
here....

I do recognize the asymmetry in the fact that, on the reference side, you
start in your binding with a binding invoker mapped onto from the key of the
wireSource
operation, whereas on the service side you can start in your binding with
any old Operation with the right name, and the InterfaceContractMapper will
allow you
to match the right one on the wire..... but I'm not sure that matters.

On a separate but related note, I was also wondering if we do actually have
any cases where we have a component service or reference but the
componentType/impl
service or reference is null.   The code I've been referring to typically
allows for this situation.  Though it seems problematic to me, I can vaguely
imagine what that would look like,
and was wondering if we have any examples of that today.


Thanks,
Scott

Reply via email to