summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/node-impl/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-06 09:40:17 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-06 09:40:17 +0000
commit8ec67f4a7e114d8bbaaa0346578b79560bde475c (patch)
treed2968f108f52847c688dc46f70f02b9928d1621a /java/sca/modules/node-impl/src
parent11088b40c732b601dbe6e96400d13d9a0715059e (diff)
Continue exploring sca client api with a new module for the client implementation
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@772115 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/node-impl/src')
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java5
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java34
-rw-r--r--java/sca/modules/node-impl/src/main/resources/META-INF/services/org.oasisopen.sca.client.SCAClientFactory1
3 files changed, 5 insertions, 35 deletions
diff --git a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
index 007c0dde1f..d005f9ba34 100644
--- a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
+++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
@@ -48,6 +48,7 @@ import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.CompositeService;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint;
+import org.apache.tuscany.sca.client.impl.SCAClientImpl;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.ContributionFactory;
@@ -677,6 +678,8 @@ public class NodeImpl implements Node, Client, SCAClient {
// Start the composite
compositeActivator.start(composite);
+
+ SCAClientImpl.addDomain(URI.create(configurationName), this);
} catch (ActivationException e) {
throw new IllegalStateException(e);
@@ -689,6 +692,8 @@ public class NodeImpl implements Node, Client, SCAClient {
try {
+ SCAClientImpl.removeDomain(URI.create(configurationName));
+
// Stop the composite
compositeActivator.stop(composite);
diff --git a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java
deleted file mode 100644
index 99bbe9423d..0000000000
--- a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * 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.
- */
-
-package org.apache.tuscany.sca.node.impl;
-
-import org.oasisopen.sca.client.SCAClient;
-import org.oasisopen.sca.client.SCAClientFactory;
-
-public class SCAClientFactoryImpl extends SCAClientFactory {
-
- @Override
- protected SCAClient createSCAClient() {
- NodeImpl nodeImpl = new NodeImpl();
- nodeImpl.start();
- return nodeImpl;
- }
-
-}
diff --git a/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.oasisopen.sca.client.SCAClientFactory b/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.oasisopen.sca.client.SCAClientFactory
deleted file mode 100644
index 698f01330d..0000000000
--- a/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.oasisopen.sca.client.SCAClientFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.tuscany.sca.node.impl.SCAClientFactoryImpl