On Wed, May 13, 2009 at 3:20 PM, Simon Laws <[email protected]> wrote:
> Hi Simon
>
> It's not clear to me from your answer whether you think that
> SCAClientFactory is or isn't intended to return an SCAClient
> implementation appropriate for the domain you which to retrieve
> services from.
>
>> The SCAClientFactory.newInstance() call uses various mechanisms
>> to identify which vendor-specific SCAClient implementation to
>> return.  The returned SCAClient object will be capable of locating
>> all domains that use the same vendor implementation that created
>> the SCAClient object.
>
> Suggests to me that you think it should
>
>>
>> The alternative form suggested above doesn't work because it would
>> require the SCAClientFactory to maintain some global knowledge of
>> which domains use which vendor implementations, and return the
>> appropriate SCAClient vendor implementation for the domain specified.
>
> Suggests to me that you think it shouldn't.
>
>
> There are two thing going on here.
>
> 1/ establish what sort of client you need - depends on the technology
> of the domain you wish to talk to
> 2/ establish precise domain you need
>
> 1/ could certainly be achieved by swapping in and out the specific
> factory implementation you have on the application classpath. Hence
> you don't need a domain ID to choose as the choice is made for you
> before the code runs. However I don't see why having the domain ID
> does any harm here in that it would allow Tuscany to make step 2
> transparent. Unless the argument here is that the Assembly spec
> doesn't define what a domain ID looks like so we can't type it in the
> interface.
> 2/ needs the domain ID
>
> Simon
>

Right thats what i don't understand too.

The only way i see it would be possible with the current API to have
some generic code talk to different vendor domains is by swapping out
the vendor specific sca client implementation jars from the classpath.

On the other hand if the SCAClientFactory newInstance was given the
domain URI then you could have all the differnet vendor sca client
impl jars on the classpath together and the SCAClientFactory SPI could
be coded to find all those sca client implementation providers and ask
them if they can talk to the domain the URI identifies and then use
the one that can to create the SCAClient instance.

   ...ant

Reply via email to