My understanding of the SCA spec is that the domainURI is a unique id for an
SCA domain. What you have in the sample seems to be the physical URI that
can be used to connect to the domain registry. I think they are two
different things and it's probably not a good idea to hard code the physical
address in the client code.
Here is what I have in mind:
1) When a client wants to connect to an SCA domain whose URI is
"urn:com.example/sca/domain1", the code would be:
SomeService s =
SCAClientFactory.newInstance("urn:com.example/sca/domain1").getService(SomeService.class,
"SomeComponent");
2) The client environment would have some of sort configuration to map the
domain URI to the domain registry URI, such as:
urn:com.example/sca/domain1 = tuscany:domain1?remote=9.120.1.1:14820
urn:com.example/sca/domain2 = tribes://228.0.0.100:50000
urn:com.example/sca/domain2 = zookeeper:9.120.1.1:14820,9.120.1.2:14820
BTW, I prefer to name the scheme to be the protocol such as http, multicast,
tcp or stack name such as hazalcast, tribes, or zookeeper.
Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <[email protected]>
Sent: Wednesday, January 13, 2010 4:09 AM
To: <[email protected]>
Subject: SCAClientFactory domainURI format
The OASIS SCAClientFactory uses a domainURI to define the which domain
to access. In Tuscany today we've various ways thats used that but
there's never been much discussion about the format of the URI, do we
need to do that? As an example, here's how the API is used:
SomeService s =
SCAClientFactory.newInstance(domainURI).getService(SomeService.class,
"SomeComponent");
So the domainURI could be things like:
"myDomain" - assumes only the Tuscany SCAClientFactoryImpl on the
classpath, and that there is a domain in the local JVM called myDomain
"tuscany:myDomain" - use the Tuscany SCAClientFactoryImpl and there is
a domain in the local JVM called myDomain
"tuscany:myDomain?remote=9.120.1.1:14820" - a remote domain called
myDomain on a remote machine running Tuscany listening on IP address
9.120.1.1 port 14820
I'm not sure we should do the first of those as it would prevent an
other runtimes SCAClientFactoryImpl from being used. Are we happy with
the "tuscany" URI prefix, do we need to make that different or
pluggable?
Any comments, do we want that, or something more, or something different?
...ant