summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/sca-client-impl
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-19 16:49:34 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-19 16:49:34 +0000
commit9182bba609947d775130c84f00639d8f0f766e00 (patch)
tree37df0c96f7eab7b98683c16150f8c0bae52b4cb4 /java/sca/modules/sca-client-impl
parent08ba6e53202a2b2f20dd8ea6e2a315fb80ff818a (diff)
Change the NodeFactoryImpl to be capable of hosting multiple instances of SCA node in the same JVM and align the OSGiNodeFactoryImpl to that feature
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@776383 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/sca-client-impl')
-rw-r--r--java/sca/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientImpl.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/java/sca/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientImpl.java b/java/sca/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientImpl.java
index 0f4c661f35..c72938d849 100644
--- a/java/sca/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientImpl.java
+++ b/java/sca/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientImpl.java
@@ -6,15 +6,15 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.tuscany.sca.client.impl;
@@ -29,7 +29,11 @@ import org.oasisopen.sca.client.SCAClient;
public class SCAClientImpl implements SCAClient {
- public <T> T getService(Class<T> serviceInterface, String serviceName, URI domainURI) throws NoSuchServiceException, NoSuchDomainException {
+ public <T> T getService(Class<T> serviceInterface, String serviceName, URI domainURI)
+ throws NoSuchServiceException, NoSuchDomainException {
+ if (domainURI == null) {
+ domainURI = URI.create(Node.DEFAULT_DOMAIN_URI);
+ }
Node node = NodeFinder.getNode(domainURI);
if (node == null) {
throw new NoSuchDomainException(domainURI.toString());