diff options
Diffstat (limited to 'java/sca/modules/node-impl')
4 files changed, 12 insertions, 35 deletions
diff --git a/java/sca/modules/node-impl/pom.xml b/java/sca/modules/node-impl/pom.xml index a58e5d9ff3..3dd65f5147 100644 --- a/java/sca/modules/node-impl/pom.xml +++ b/java/sca/modules/node-impl/pom.xml @@ -96,6 +96,13 @@ <dependency> <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-sca-client-impl</artifactId> + <version>2.0-SNAPSHOT</version> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-binding-sca</artifactId> <version>2.0-SNAPSHOT</version> <scope>runtime</scope> 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
|