summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/domain-manager/pom.xml4
-rw-r--r--java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java14
-rw-r--r--java/sca/modules/host-embedded/pom.xml2
-rw-r--r--java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java8
-rw-r--r--java/sca/modules/implementation-node-runtime/pom.xml6
-rw-r--r--java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java8
-rw-r--r--java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java22
-rw-r--r--java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java10
-rw-r--r--java/sca/modules/node-api/LICENSE (renamed from java/sca/modules/node2-api/LICENSE)0
-rw-r--r--java/sca/modules/node-api/NOTICE (renamed from java/sca/modules/node2-api/NOTICE)0
-rw-r--r--java/sca/modules/node-api/pom.xml (renamed from java/sca/modules/node2-api/pom.xml)2
-rw-r--r--java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCAClient.java (renamed from java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCAClient.java)0
-rw-r--r--java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCAContribution.java (renamed from java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCAContribution.java)0
-rw-r--r--java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode.java (renamed from java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java)2
-rw-r--r--java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java33
-rw-r--r--java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java (renamed from java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java)4
-rw-r--r--java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java201
-rw-r--r--java/sca/modules/node-impl/LICENSE (renamed from java/sca/modules/node2-impl/LICENSE)0
-rw-r--r--java/sca/modules/node-impl/NOTICE (renamed from java/sca/modules/node2-impl/NOTICE)0
-rw-r--r--java/sca/modules/node-impl/pom.xml (renamed from java/sca/modules/node2-impl/pom.xml)4
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2FactoryImpl.java (renamed from java/sca/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java)14
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2Impl.java63
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java55
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java (renamed from java/sca/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java)9
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java (renamed from java/sca/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java)0
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java (renamed from java/sca/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java)0
-rw-r--r--java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory17
-rw-r--r--java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory (renamed from java/sca/modules/node2-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory)0
-rw-r--r--java/sca/modules/node-impl/src/test/java/hello/HelloWorld.java (renamed from java/sca/modules/node2-impl/src/test/java/hello/HelloWorld.java)0
-rw-r--r--java/sca/modules/node-impl/src/test/java/hello/HelloWorldImpl.java (renamed from java/sca/modules/node2-impl/src/test/java/hello/HelloWorldImpl.java)0
-rw-r--r--java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/Node2ImplTestCase.java (renamed from java/sca/modules/node2-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java)20
-rw-r--r--java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java119
-rw-r--r--java/sca/modules/node-impl/src/test/resources/HelloWorld.composite (renamed from java/sca/modules/node2-impl/src/test/resources/HelloWorld.composite)0
-rw-r--r--java/sca/modules/node-impl/src/test/resources/META-INF/sca-contribution.xml (renamed from java/sca/modules/node2-impl/src/test/resources/META-INF/sca-contribution.xml)0
-rw-r--r--java/sca/modules/node-launcher-osgi/LICENSE (renamed from java/sca/modules/node2-launcher-osgi/LICENSE)0
-rw-r--r--java/sca/modules/node-launcher-osgi/NOTICE (renamed from java/sca/modules/node2-launcher-osgi/NOTICE)0
-rw-r--r--java/sca/modules/node-launcher-osgi/pom.xml (renamed from java/sca/modules/node2-launcher-osgi/pom.xml)2
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/Contribution.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/Contribution.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/DomainManagerLauncher.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/DomainManagerLauncher.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/JarFileFinder.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/JarFileFinder.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherException.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherException.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeDaemonLauncher.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeDaemonLauncher.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncher.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncher.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherUtil.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherUtil.java)2
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeMain.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeMain.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeServletFilter.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeServletFilter.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/OSGiHost.java (renamed from java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/OSGiHost.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/test/java/hello/HelloWorld.java (renamed from java/sca/modules/node2-launcher-osgi/src/test/java/hello/HelloWorld.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/test/java/hello/HelloWorldImpl.java (renamed from java/sca/modules/node2-launcher-osgi/src/test/java/hello/HelloWorldImpl.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHostTestCase.java (renamed from java/sca/modules/node2-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHostTestCase.java)0
-rw-r--r--java/sca/modules/node-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherTestCase.java (renamed from java/sca/modules/node2-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherTestCase.java)4
-rw-r--r--java/sca/modules/node-launcher-osgi/src/test/resources/HelloWorld.composite (renamed from java/sca/modules/node2-launcher-osgi/src/test/resources/HelloWorld.composite)0
-rw-r--r--java/sca/modules/node-launcher-webapp/LICENSE (renamed from java/sca/modules/node2-launcher-webapp/LICENSE)0
-rw-r--r--java/sca/modules/node-launcher-webapp/NOTICE (renamed from java/sca/modules/node2-launcher-webapp/NOTICE)0
-rw-r--r--java/sca/modules/node-launcher-webapp/pom.xml (renamed from java/sca/modules/node2-launcher-webapp/pom.xml)4
-rw-r--r--java/sca/modules/node-launcher-webapp/src/main/webapp/META-INF/sca-contribution.xml (renamed from java/sca/modules/node2-launcher-webapp/src/main/webapp/META-INF/sca-contribution.xml)0
-rw-r--r--java/sca/modules/node-launcher-webapp/src/main/webapp/WEB-INF/web.xml (renamed from java/sca/modules/node2-launcher-webapp/src/main/webapp/WEB-INF/web.xml)0
-rw-r--r--java/sca/modules/node-launcher-webapp/src/main/webapp/index.jsp (renamed from java/sca/modules/node2-launcher-webapp/src/main/webapp/index.jsp)0
-rw-r--r--java/sca/modules/node-launcher/LICENSE (renamed from java/sca/modules/node2-launcher/LICENSE)0
-rw-r--r--java/sca/modules/node-launcher/NOTICE (renamed from java/sca/modules/node2-launcher/NOTICE)0
-rw-r--r--java/sca/modules/node-launcher/pom.xml (renamed from java/sca/modules/node2-launcher/pom.xml)2
-rw-r--r--java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/Contribution.java (renamed from java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/Contribution.java)0
-rw-r--r--java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java (renamed from java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java)0
-rw-r--r--java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/LauncherException.java (renamed from java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/LauncherException.java)0
-rw-r--r--java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java (renamed from java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java)0
-rw-r--r--java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java (renamed from java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java)0
-rw-r--r--java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java (renamed from java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java)0
-rw-r--r--java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java (renamed from java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java)0
-rw-r--r--java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeServletFilter.java (renamed from java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeServletFilter.java)0
-rw-r--r--java/sca/modules/node-manager/pom.xml6
-rw-r--r--java/sca/modules/pom.xml10
-rw-r--r--java/sca/modules/runtime/pom.xml4
74 files changed, 574 insertions, 77 deletions
diff --git a/java/sca/modules/domain-manager/pom.xml b/java/sca/modules/domain-manager/pom.xml
index 56366fb177..ff197e8aeb 100644
--- a/java/sca/modules/domain-manager/pom.xml
+++ b/java/sca/modules/domain-manager/pom.xml
@@ -67,7 +67,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-api</artifactId>
+ <artifactId>tuscany-node-api</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>
@@ -79,7 +79,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-impl</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java b/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java
index 3e78073264..f96e19ed72 100644
--- a/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java
+++ b/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java
@@ -21,8 +21,8 @@ package org.apache.tuscany.sca.domain.manager.launcher;
import org.apache.tuscany.sca.domain.manager.impl.DomainManagerConfiguration;
import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
/**
* Bootstrap class for the SCA domain manager.
@@ -30,15 +30,15 @@ import org.apache.tuscany.sca.node.SCANode2Factory;
* @version $Rev$ $Date$
*/
public class DomainManagerLauncherBootstrap {
- private SCANode2 node;
+ private SCANode node;
/**
* A node wrappering an instance of a domain manager.
*/
- public static class NodeFacade implements SCANode2 {
+ public static class NodeFacade implements SCANode {
private ClassLoader threadContextClassLoader;
private ClassLoader runtimeClassLoader;
- private SCANode2 node;
+ private SCANode node;
private String rootDirectory;
private NodeFacade(String rootDirectory) {
@@ -51,7 +51,7 @@ public class DomainManagerLauncherBootstrap {
boolean started = false;
try {
Thread.currentThread().setContextClassLoader(runtimeClassLoader);
- SCANode2Factory factory = SCANode2Factory.newInstance();
+ SCANodeFactory factory = SCANodeFactory.newInstance();
node = factory.createSCANodeFromClassLoader("DomainManager.composite", getClass().getClassLoader());
node.start();
@@ -88,7 +88,7 @@ public class DomainManagerLauncherBootstrap {
* Returns the node representing the domain manager.
* @return
*/
- public SCANode2 getNode() {
+ public SCANode getNode() {
return node;
}
diff --git a/java/sca/modules/host-embedded/pom.xml b/java/sca/modules/host-embedded/pom.xml
index 4cb523b9a0..92fd8cc016 100644
--- a/java/sca/modules/host-embedded/pom.xml
+++ b/java/sca/modules/host-embedded/pom.xml
@@ -31,7 +31,7 @@
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-impl</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>
<dependency>
diff --git a/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java b/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java
index 8316759206..1bca290c27 100644
--- a/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java
+++ b/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java
@@ -43,8 +43,8 @@ import org.apache.tuscany.sca.host.embedded.management.ComponentListener;
import org.apache.tuscany.sca.host.embedded.management.ComponentManager;
import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
import org.osoa.sca.CallableReference;
import org.osoa.sca.ServiceReference;
@@ -68,7 +68,7 @@ public class DefaultSCADomain extends SCADomain {
private List<String> contributionURLs;
private CompositeActivator compositeActivator;
- private SCANode2 node;
+ private SCANode node;
private SCAClient client;
/**
@@ -149,7 +149,7 @@ public class DefaultSCADomain extends SCADomain {
}
public void init() {
- SCANode2Factory factory = SCANode2Factory.newInstance();
+ SCANodeFactory factory = SCANodeFactory.newInstance();
List<SCAContribution> contributions = new ArrayList<SCAContribution>();
diff --git a/java/sca/modules/implementation-node-runtime/pom.xml b/java/sca/modules/implementation-node-runtime/pom.xml
index d043a1f909..c040b44d11 100644
--- a/java/sca/modules/implementation-node-runtime/pom.xml
+++ b/java/sca/modules/implementation-node-runtime/pom.xml
@@ -44,13 +44,13 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-api</artifactId>
+ <artifactId>tuscany-node-api</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-launcher</artifactId>
+ <artifactId>tuscany-node-launcher</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>
@@ -68,7 +68,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-impl</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java b/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java
index edf2aefdde..7d5954b3fd 100644
--- a/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java
+++ b/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java
@@ -20,7 +20,7 @@
package org.apache.tuscany.sca.implementation.node.launcher;
import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode;
/**
* Bootstrap class for the SCA node daemon.
@@ -28,12 +28,12 @@ import org.apache.tuscany.sca.node.SCANode2;
* @version $Rev$ $Date$
*/
public class NodeImplementationDaemonBootstrap {
- private SCANode2 node;
+ private SCANode node;
/**
* A node wrappering an instance of a node daemon.
*/
- public static class NodeFacade implements SCANode2 {
+ public static class NodeFacade implements SCANode {
private ClassLoader threadContextClassLoader;
private ClassLoader runtimeClassLoader;
private SCADomain daemon;
@@ -77,7 +77,7 @@ public class NodeImplementationDaemonBootstrap {
* Returns the node representing the daemon.
* @return
*/
- public SCANode2 getNode() {
+ public SCANode getNode() {
return node;
}
diff --git a/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java b/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
index 06b1966c57..0264574fb9 100644
--- a/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
+++ b/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
@@ -21,8 +21,8 @@ package org.apache.tuscany.sca.implementation.node.launcher;
import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
import org.osoa.sca.CallableReference;
import org.osoa.sca.ServiceReference;
@@ -33,17 +33,17 @@ import org.osoa.sca.ServiceReference;
*/
public class NodeImplementationLauncherBootstrap {
- private SCANode2 node;
+ private SCANode node;
/**
* A node facade.
*/
- public static class NodeFacade implements SCANode2, SCAClient {
+ public static class NodeFacade implements SCANode, SCAClient {
private ClassLoader threadContextClassLoader;
private ClassLoader runtimeClassLoader;
- private SCANode2 delegate;
+ private SCANode delegate;
- private NodeFacade(SCANode2 delegate) {
+ private NodeFacade(SCANode delegate) {
runtimeClassLoader = Thread.currentThread().getContextClassLoader();
this.delegate = delegate;
}
@@ -90,7 +90,7 @@ public class NodeImplementationLauncherBootstrap {
* @param configurationURI
*/
public NodeImplementationLauncherBootstrap(String configurationURI) throws Exception {
- SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
node = new NodeFacade(nodeFactory.createSCANodeFromURL(configurationURI));
}
@@ -101,7 +101,7 @@ public class NodeImplementationLauncherBootstrap {
* @param contributionClassLoader
*/
public NodeImplementationLauncherBootstrap(String compositeURI, ClassLoader contributionClassLoader) throws Exception {
- SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
node = new NodeFacade(nodeFactory.createSCANodeFromClassLoader(compositeURI, contributionClassLoader));
}
@@ -113,7 +113,7 @@ public class NodeImplementationLauncherBootstrap {
* @param locations
*/
public NodeImplementationLauncherBootstrap(String compositeURI, String[] uris, String[] locations) throws Exception {
- SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
SCAContribution[] contributions = new SCAContribution[uris.length];
for (int i = 0; i < uris.length; i++) {
contributions[i] = new SCAContribution(uris[i], locations[i]);
@@ -129,7 +129,7 @@ public class NodeImplementationLauncherBootstrap {
* @param locations
*/
public NodeImplementationLauncherBootstrap(String compositeURI, String compositeContent, String[] uris, String[] locations) throws Exception {
- SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
SCAContribution[] contributions = new SCAContribution[uris.length];
for (int i = 0; i < uris.length; i++) {
contributions[i] = new SCAContribution(uris[i], locations[i]);
@@ -142,7 +142,7 @@ public class NodeImplementationLauncherBootstrap {
*
* @return
*/
- public SCANode2 getNode() {
+ public SCANode getNode() {
return node;
}
diff --git a/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java b/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java
index 47b42c9224..5a50f87d4c 100644
--- a/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java
+++ b/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java
@@ -48,8 +48,8 @@ import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
import org.apache.tuscany.sca.host.http.ServletMappingException;
import org.apache.tuscany.sca.implementation.node.launcher.NodeImplementationLauncherUtil;
import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode2;
-import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
/**
* ServletHost implementation for use in a Webapp Node environment.
@@ -62,7 +62,7 @@ public class NodeWebAppServletHost implements ServletHost, Filter {
private static final NodeWebAppServletHost servletHost = new NodeWebAppServletHost();
private Map<String, Servlet> servlets = new HashMap<String, Servlet>();
- private SCANode2 node;
+ private SCANode node;
private String contextPath = "/";
private int defaultPort = 8080;
@@ -112,7 +112,7 @@ public class NodeWebAppServletHost implements ServletHost, Filter {
String nodeConfiguration = NodeImplementationLauncherUtil.nodeConfigurationURI(nodeName);
// Create the SCA node
- SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+ SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
node = nodeFactory.createSCANodeFromURL(nodeConfiguration);
// Register the Servlet host
@@ -350,7 +350,7 @@ public class NodeWebAppServletHost implements ServletHost, Filter {
*
* @return
*/
- private static ServletHostExtensionPoint servletHosts(SCANode2 node) {
+ private static ServletHostExtensionPoint servletHosts(SCANode node) {
//FIXME Need a clean way to get the extension point registry
// from the node
ExtensionPointRegistry registry;
diff --git a/java/sca/modules/node2-api/LICENSE b/java/sca/modules/node-api/LICENSE
index 6e529a25c4..6e529a25c4 100644
--- a/java/sca/modules/node2-api/LICENSE
+++ b/java/sca/modules/node-api/LICENSE
diff --git a/java/sca/modules/node2-api/NOTICE b/java/sca/modules/node-api/NOTICE
index 1325efd8bf..1325efd8bf 100644
--- a/java/sca/modules/node2-api/NOTICE
+++ b/java/sca/modules/node-api/NOTICE
diff --git a/java/sca/modules/node2-api/pom.xml b/java/sca/modules/node-api/pom.xml
index 8e52a99014..1cc386f6bc 100644
--- a/java/sca/modules/node2-api/pom.xml
+++ b/java/sca/modules/node-api/pom.xml
@@ -27,7 +27,7 @@
<relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>tuscany-node2-api</artifactId>
+ <artifactId>tuscany-node-api</artifactId>
<name>Apache Tuscany SCA Node API</name>
<dependencies>
diff --git a/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCAClient.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCAClient.java
index f390e8881e..f390e8881e 100644
--- a/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCAClient.java
+++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCAClient.java
diff --git a/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCAContribution.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCAContribution.java
index de7f352122..de7f352122 100644
--- a/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCAContribution.java
+++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCAContribution.java
diff --git a/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode.java
index c193467b09..fea749a57c 100644
--- a/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java
+++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode.java
@@ -27,7 +27,7 @@ package org.apache.tuscany.sca.node;
*
* @version $Rev$ $Date$
*/
-public interface SCANode2 {
+public interface SCANode {
/**
* Start the composite loaded in the node.
diff --git a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java
new file mode 100644
index 0000000000..a1d4ddb2b1
--- /dev/null
+++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java
@@ -0,0 +1,33 @@
+/*
+ * 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;
+
+
+
+/**
+ * Represents an SCA processing node.
+ * A node is loaded with an SCA composites. It can start and stop that composite.
+ *
+ * @version $Rev$ $Date$
+ * @deprecated Use SCANode instead
+ */
+@Deprecated
+public interface SCANode2 extends SCANode {
+}
diff --git a/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java
index 9b63531a94..2b0dbc88eb 100644
--- a/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java
+++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java
@@ -30,7 +30,9 @@ import org.osoa.sca.ServiceRuntimeException;
* with an SCA composite and the SCA contributions required by the composite.
*
* @version $Rev$ $Date$
+ * @deprecated Use SCANodeFactory
*/
+@Deprecated
public abstract class SCANode2Factory {
public static class NodeProxy implements SCANode2, SCAClient {
@@ -138,7 +140,7 @@ public abstract class SCANode2Factory {
}
// Fail back to default impl
- String className = "org.apache.tuscany.sca.node.impl.NodeFactoryImpl";
+ String className = "org.apache.tuscany.sca.node.impl.Node2FactoryImpl";
Class<?> cls = Class.forName(className, true, classLoader);
scaNodeFactory = (SCANode2Factory)cls.newInstance();
diff --git a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java
new file mode 100644
index 0000000000..6d02d654e2
--- /dev/null
+++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java
@@ -0,0 +1,201 @@
+/*
+ * 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;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.osoa.sca.CallableReference;
+import org.osoa.sca.ServiceReference;
+import org.osoa.sca.ServiceRuntimeException;
+
+/**
+ * A factory for SCA processing nodes. An SCA processing node can be loaded
+ * with an SCA composite and the SCA contributions required by the composite.
+ *
+ * @version $Rev$ $Date$
+ */
+public abstract class SCANodeFactory {
+
+ public static class NodeProxy implements SCANode, SCAClient {
+ private Object node;
+
+ private NodeProxy(Object node) {
+ super();
+ this.node = node;
+ }
+
+ public static <T> T createProxy(Class<T> type, Object node) {
+ try {
+ return type.getDeclaredConstructor(Object.class).newInstance(node);
+ } catch (Exception e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+
+ public <B, R extends CallableReference<B>> R cast(B target) throws IllegalArgumentException {
+ try {
+ return (R)node.getClass().getMethod("cast", Object.class).invoke(node, target);
+ } catch (Throwable e) {
+ handleException(e);
+ return null;
+ }
+ }
+
+ public <B> B getService(Class<B> businessInterface, String serviceName) {
+ try {
+ return (B)node.getClass().getMethod("getService", Class.class, String.class).invoke(node,
+ businessInterface,
+ serviceName);
+ } catch (Throwable e) {
+ handleException(e);
+ return null;
+ }
+ }
+
+ public <B> ServiceReference<B> getServiceReference(Class<B> businessInterface, String serviceName) {
+ try {
+ return (ServiceReference<B>)node.getClass().getMethod("getServiceReference", Class.class, String.class)
+ .invoke(node, businessInterface, serviceName);
+ } catch (Throwable e) {
+ handleException(e);
+ return null;
+ }
+ }
+
+ public void start() {
+ try {
+ node.getClass().getMethod("start").invoke(node);
+ } catch (Throwable e) {
+ handleException(e);
+ }
+ }
+
+ public void stop() {
+ try {
+ node.getClass().getMethod("stop").invoke(node);
+ } catch (Throwable e) {
+ handleException(e);
+ }
+ }
+
+ private static void handleException(Throwable ex) {
+ if (ex instanceof InvocationTargetException) {
+ ex = ((InvocationTargetException)ex).getTargetException();
+ }
+ if (ex instanceof RuntimeException) {
+ throw (RuntimeException)ex;
+ }
+ if (ex instanceof Error) {
+ throw (Error)ex;
+ } else {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ }
+
+ /**
+ * Returns a new SCA node factory instance.
+ *
+ * @return a new SCA node factory
+ */
+ public static SCANodeFactory newInstance() {
+ SCANodeFactory scaNodeFactory = null;
+
+ try {
+ final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ // Use reflection APIs to call ServiceDiscovery to avoid hard dependency to tuscany-extensibility
+ try {
+ Class<?> discoveryClass =
+ Class.forName("org.apache.tuscany.sca.extensibility.ServiceDiscovery", true, classLoader);
+ Object instance = discoveryClass.getMethod("getInstance").invoke(null);
+ Class<?> factoryImplClass =
+ (Class<?>)discoveryClass.getMethod("loadFirstServiceClass", Class.class)
+ .invoke(instance, SCANodeFactory.class);
+ if (factoryImplClass != null) {
+ scaNodeFactory = (SCANodeFactory)factoryImplClass.newInstance();
+ return scaNodeFactory;
+ }
+ } catch (ClassNotFoundException e) {
+ // Ignore
+ }
+
+ // Fail back to default impl
+ String className = "org.apache.tuscany.sca.node.impl.NodeFactoryImpl";
+
+ Class<?> cls = Class.forName(className, true, classLoader);
+ scaNodeFactory = (SCANodeFactory)cls.newInstance();
+ return scaNodeFactory;
+
+ } catch (Exception e) {
+ throw new ServiceRuntimeException(e);
+ }
+ }
+
+ /**
+ * Create a SCA node based on the discovery of the contribution on the classpath for the
+ * given classloader. This method should be treated a convinient shortcut with the following
+ * assumptions:
+ * <ul>
+ * <li>This is a standalone application and there is a deployable composite file on the classpath.
+ * <li>There is only one contribution which contains the deployable composite file physically in its packaging hierarchy.
+ * </ul>
+ * @param compositeURI The URI of the composite file relative to the root of the enclosing contribution
+ * @param classLoader The ClassLoader used to load the composite file as a resource. If the value is null,
+ * then thread context classloader will be used
+ * @return A newly created SCA node
+ */
+ public abstract SCANode createSCANodeFromClassLoader(String compositeURI, ClassLoader classLoader);
+
+ /**
+ * Creates a new SCA node from the configuration URL
+ *
+ * @param configurationURL the URL of the node configuration which is the ATOM feed
+ * that contains the URI of the composite and a collection of URLs for the contributions
+ *
+ * @return a new SCA node.
+ */
+ public abstract SCANode createSCANodeFromURL(String configurationURL);
+
+ /**
+ * Creates a new SCA node.
+ *
+ * @param compositeURI the URI of the composite to use
+ * @param contributions the URI of the contributions that provides the composites and related
+ * artifacts. If the list is empty, then we will use the thread context classloader to discover
+ * the contribution on the classpath
+ *
+ * @return a new SCA node.
+ */
+ public abstract SCANode createSCANode(String compositeURI, SCAContribution... contributions);
+
+ /**
+ * Creates a new SCA node.
+ *
+ * @param compositeURI the URI of the composite to use
+ * @param compositeContent the XML content of the composite to use
+ * @param contributions the URI of the contributions that provides the composites and related artifacts
+ * @return a new SCA node.
+ */
+ public abstract SCANode createSCANode(String compositeURI,
+ String compositeContent,
+ SCAContribution... contributions);
+
+}
diff --git a/java/sca/modules/node2-impl/LICENSE b/java/sca/modules/node-impl/LICENSE
index 8aa906c321..8aa906c321 100644
--- a/java/sca/modules/node2-impl/LICENSE
+++ b/java/sca/modules/node-impl/LICENSE
diff --git a/java/sca/modules/node2-impl/NOTICE b/java/sca/modules/node-impl/NOTICE
index fdfa0e9faa..fdfa0e9faa 100644
--- a/java/sca/modules/node2-impl/NOTICE
+++ b/java/sca/modules/node-impl/NOTICE
diff --git a/java/sca/modules/node2-impl/pom.xml b/java/sca/modules/node-impl/pom.xml
index 4f6f73d9be..7bad8a5750 100644
--- a/java/sca/modules/node2-impl/pom.xml
+++ b/java/sca/modules/node-impl/pom.xml
@@ -27,7 +27,7 @@
<relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>tuscany-node2-impl</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<name>Apache Tuscany SCA Node Implementation</name>
<dependencies>
@@ -46,7 +46,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-api</artifactId>
+ <artifactId>tuscany-node-api</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>
diff --git a/java/sca/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2FactoryImpl.java
index 3ec0958e4f..419900c5ac 100644
--- a/java/sca/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
+++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2FactoryImpl.java
@@ -27,29 +27,31 @@ import org.apache.tuscany.sca.node.SCANode2Factory;
* Default implementation of an SCA node factory.
*
* @version $Rev$ $Date$
+ * @deprecated
*/
-public class NodeFactoryImpl extends SCANode2Factory {
- public NodeFactoryImpl() {
+@Deprecated
+public class Node2FactoryImpl extends SCANode2Factory {
+ public Node2FactoryImpl() {
}
@Override
public SCANode2 createSCANodeFromClassLoader(String compositeURI, ClassLoader classLoader) {
- return new NodeImpl(classLoader, compositeURI);
+ return new Node2Impl(classLoader, compositeURI);
}
@Override
public SCANode2 createSCANodeFromURL(String configurationURI) {
- return new NodeImpl(configurationURI);
+ return new Node2Impl(configurationURI);
}
@Override
public SCANode2 createSCANode(String compositeURI, SCAContribution... contributions) {
- return new NodeImpl(compositeURI, contributions);
+ return new Node2Impl(compositeURI, contributions);
}
@Override
public SCANode2 createSCANode(String compositeURI, String compositeContent, SCAContribution... contributions) {
- return new NodeImpl(compositeURI, compositeContent, contributions);
+ return new Node2Impl(compositeURI, compositeContent, contributions);
}
}
diff --git a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2Impl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2Impl.java
new file mode 100644
index 0000000000..bc2f10fb7e
--- /dev/null
+++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2Impl.java
@@ -0,0 +1,63 @@
+/*
+ * 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.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode2;
+
+/**
+ * Node2 Impl
+ */
+public class Node2Impl extends NodeImpl implements SCANode2 {
+
+ /**
+ * @param configurationURI
+ */
+ public Node2Impl(String configurationURI) {
+ super(configurationURI);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param classLoader
+ * @param compositeURI
+ */
+ public Node2Impl(ClassLoader classLoader, String compositeURI) {
+ super(classLoader, compositeURI);
+ }
+
+ /**
+ * @param compositeURI
+ * @param contributions
+ */
+ public Node2Impl(String compositeURI, SCAContribution[] contributions) {
+ super(compositeURI, contributions);
+ }
+
+ /**
+ * @param compositeURI
+ * @param compositeContent
+ * @param contributions
+ */
+ public Node2Impl(String compositeURI, String compositeContent, SCAContribution[] contributions) {
+ super(compositeURI, compositeContent, contributions);
+ }
+
+}
diff --git a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
new file mode 100644
index 0000000000..18b166acdd
--- /dev/null
+++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
@@ -0,0 +1,55 @@
+/*
+ * 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.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+
+/**
+ * Default implementation of an SCA node factory.
+ *
+ * @version $Rev$ $Date$
+ */
+public class NodeFactoryImpl extends SCANodeFactory {
+ public NodeFactoryImpl() {
+ }
+
+ @Override
+ public SCANode createSCANodeFromClassLoader(String compositeURI, ClassLoader classLoader) {
+ return new NodeImpl(classLoader, compositeURI);
+ }
+
+ @Override
+ public SCANode createSCANodeFromURL(String configurationURI) {
+ return new NodeImpl(configurationURI);
+ }
+
+ @Override
+ public SCANode createSCANode(String compositeURI, SCAContribution... contributions) {
+ return new NodeImpl(compositeURI, contributions);
+ }
+
+ @Override
+ public SCANode createSCANode(String compositeURI, String compositeContent, SCAContribution... contributions) {
+ return new NodeImpl(compositeURI, compositeContent, contributions);
+ }
+
+}
diff --git a/java/sca/modules/node2-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 835829db1a..e35203bc5b 100644
--- a/java/sca/modules/node2-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
@@ -71,7 +71,7 @@ import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
import org.apache.tuscany.sca.runtime.RuntimeComponentContext;
import org.osoa.sca.CallableReference;
@@ -83,7 +83,7 @@ import org.osoa.sca.ServiceRuntimeException;
*
* @version $Rev$ $Date$
*/
-public class NodeImpl implements SCANode2, SCAClient {
+public class NodeImpl implements SCANode, SCAClient {
private static final Logger logger = Logger.getLogger(NodeImpl.class.getName());
@@ -144,6 +144,11 @@ public class NodeImpl implements SCANode2, SCAClient {
}
}
+ /**
+ * Construct a node by discovering the node configuration (composite+contrbutions) on the classpath
+ * @param classLoader
+ * @param compositeURI
+ */
NodeImpl(ClassLoader classLoader, String compositeURI) {
configurationName = compositeURI;
logger.log(Level.INFO, "Creating node: " + configurationName);
diff --git a/java/sca/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java
index c9995d6024..c9995d6024 100644
--- a/java/sca/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java
+++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java
diff --git a/java/sca/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java
index 98a44cef9e..98a44cef9e 100644
--- a/java/sca/modules/node2-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java
+++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java
diff --git a/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory b/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory
new file mode 100644
index 0000000000..4215855ac9
--- /dev/null
+++ b/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory
@@ -0,0 +1,17 @@
+# 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.
+org.apache.tuscany.sca.node.impl.Node2FactoryImpl \ No newline at end of file
diff --git a/java/sca/modules/node2-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory b/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory
index 800bdd84cc..800bdd84cc 100644
--- a/java/sca/modules/node2-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory
+++ b/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory
diff --git a/java/sca/modules/node2-impl/src/test/java/hello/HelloWorld.java b/java/sca/modules/node-impl/src/test/java/hello/HelloWorld.java
index 2f519cb81d..2f519cb81d 100644
--- a/java/sca/modules/node2-impl/src/test/java/hello/HelloWorld.java
+++ b/java/sca/modules/node-impl/src/test/java/hello/HelloWorld.java
diff --git a/java/sca/modules/node2-impl/src/test/java/hello/HelloWorldImpl.java b/java/sca/modules/node-impl/src/test/java/hello/HelloWorldImpl.java
index c9a7560b12..c9a7560b12 100644
--- a/java/sca/modules/node2-impl/src/test/java/hello/HelloWorldImpl.java
+++ b/java/sca/modules/node-impl/src/test/java/hello/HelloWorldImpl.java
diff --git a/java/sca/modules/node2-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java b/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/Node2ImplTestCase.java
index 38fe211e7d..52d96dd72d 100644
--- a/java/sca/modules/node2-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
+++ b/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/Node2ImplTestCase.java
@@ -32,9 +32,9 @@ import org.apache.tuscany.sca.node.SCANode2Factory;
import org.junit.Test;
/**
- *
+ * Test case for Node2Impl
*/
-public class NodeImplTestCase {
+public class Node2ImplTestCase {
private static String composite =
"<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\"" + " xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.0\""
+ " targetNamespace=\"http://sample/composite\""
@@ -47,7 +47,7 @@ public class NodeImplTestCase {
@Test
public void testNodeWithCompositeContent() {
- SCANode2Factory factory = new NodeFactoryImpl();
+ SCANode2Factory factory = SCANode2Factory.newInstance();
SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
SCANode2 node = factory.createSCANode("HelloWorld.composite", composite, contribution);
testNode(node);
@@ -55,14 +55,14 @@ public class NodeImplTestCase {
@Test
public void testNodeWithCompositeContentAndNoContribution() {
- SCANode2Factory factory = new NodeFactoryImpl();
+ SCANode2Factory factory = SCANode2Factory.newInstance();
SCANode2 node = factory.createSCANode("HelloWorld.composite", composite);
testNode(node);
}
@Test
public void testNodeWithoutCompositeURI() {
- SCANode2Factory factory = new NodeFactoryImpl();
+ SCANode2Factory factory = SCANode2Factory.newInstance();
SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
SCANode2 node = factory.createSCANode(null, contribution);
testNode(node);
@@ -70,7 +70,7 @@ public class NodeImplTestCase {
@Test
public void testNodeWithCompositeURI() {
- SCANode2Factory factory = new NodeFactoryImpl();
+ SCANode2Factory factory = SCANode2Factory.newInstance();
SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
String compositeURI = new File("target/test-classes/HelloWorld.composite").toURI().toString();
SCANode2 node = factory.createSCANode(compositeURI, contribution);
@@ -79,7 +79,7 @@ public class NodeImplTestCase {
@Test
public void testNodeWithRelativeCompositeURI() {
- SCANode2Factory factory = new NodeFactoryImpl();
+ SCANode2Factory factory = SCANode2Factory.newInstance();
SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
String compositeURI = "HelloWorld.composite";
SCANode2 node = factory.createSCANode(compositeURI, contribution);
@@ -88,7 +88,7 @@ public class NodeImplTestCase {
@Test
public void testNodeWithRelativeCompositeURIAndNoContribution() {
- SCANode2Factory factory = new NodeFactoryImpl();
+ SCANode2Factory factory = SCANode2Factory.newInstance();
String compositeURI = "HelloWorld.composite";
SCANode2 node = factory.createSCANode(compositeURI, new SCAContribution[0]);
testNode(node);
@@ -96,7 +96,7 @@ public class NodeImplTestCase {
@Test
public void testNodeWithClassLoader() {
- SCANode2Factory factory = new NodeFactoryImpl();
+ SCANode2Factory factory = SCANode2Factory.newInstance();
String compositeURI = "HelloWorld.composite";
SCANode2 node = factory.createSCANodeFromClassLoader(compositeURI, HelloWorld.class.getClassLoader());
testNode(node);
@@ -104,7 +104,7 @@ public class NodeImplTestCase {
@Test
public void testNodeWithClassLoaderAndNullComposite() {
- SCANode2Factory factory = new NodeFactoryImpl();
+ SCANode2Factory factory = SCANode2Factory.newInstance();
SCANode2 node = factory.createSCANodeFromClassLoader(null, HelloWorld.class.getClassLoader());
testNode(node);
}
diff --git a/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java b/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
new file mode 100644
index 0000000000..d620f6b62a
--- /dev/null
+++ b/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
@@ -0,0 +1,119 @@
+/*
+ * 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 hello.HelloWorld;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.junit.Test;
+
+/**
+ * Test case for NodeImpl
+ */
+public class NodeImplTestCase {
+ private static String composite =
+ "<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\"" + " xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.0\""
+ + " targetNamespace=\"http://sample/composite\""
+ + " xmlns:sc=\"http://sample/composite\""
+ + " name=\"HelloWorld\">"
+ + " <component name=\"HelloWorld\">"
+ + " <implementation.java class=\"hello.HelloWorldImpl\"/>"
+ + " </component>"
+ + " </composite>";
+
+ @Test
+ public void testNodeWithCompositeContent() {
+ SCANodeFactory factory = new NodeFactoryImpl();
+ SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
+ SCANode node = factory.createSCANode("HelloWorld.composite", composite, contribution);
+ testNode(node);
+ }
+
+ @Test
+ public void testNodeWithCompositeContentAndNoContribution() {
+ SCANodeFactory factory = new NodeFactoryImpl();
+ SCANode node = factory.createSCANode("HelloWorld.composite", composite);
+ testNode(node);
+ }
+
+ @Test
+ public void testNodeWithoutCompositeURI() {
+ SCANodeFactory factory = new NodeFactoryImpl();
+ SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
+ SCANode node = factory.createSCANode(null, contribution);
+ testNode(node);
+ }
+
+ @Test
+ public void testNodeWithCompositeURI() {
+ SCANodeFactory factory = new NodeFactoryImpl();
+ SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
+ String compositeURI = new File("target/test-classes/HelloWorld.composite").toURI().toString();
+ SCANode node = factory.createSCANode(compositeURI, contribution);
+ testNode(node);
+ }
+
+ @Test
+ public void testNodeWithRelativeCompositeURI() {
+ SCANodeFactory factory = new NodeFactoryImpl();
+ SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
+ String compositeURI = "HelloWorld.composite";
+ SCANode node = factory.createSCANode(compositeURI, contribution);
+ testNode(node);
+ }
+
+ @Test
+ public void testNodeWithRelativeCompositeURIAndNoContribution() {
+ SCANodeFactory factory = new NodeFactoryImpl();
+ String compositeURI = "HelloWorld.composite";
+ SCANode node = factory.createSCANode(compositeURI, new SCAContribution[0]);
+ testNode(node);
+ }
+
+ @Test
+ public void testNodeWithClassLoader() {
+ SCANodeFactory factory = new NodeFactoryImpl();
+ String compositeURI = "HelloWorld.composite";
+ SCANode node = factory.createSCANodeFromClassLoader(compositeURI, HelloWorld.class.getClassLoader());
+ testNode(node);
+ }
+
+ @Test
+ public void testNodeWithClassLoaderAndNullComposite() {
+ SCANodeFactory factory = new NodeFactoryImpl();
+ SCANode node = factory.createSCANodeFromClassLoader(null, HelloWorld.class.getClassLoader());
+ testNode(node);
+ }
+
+ private void testNode(SCANode node) {
+ node.start();
+ HelloWorld hw = ((SCAClient)node).getService(HelloWorld.class, "HelloWorld");
+ Assert.assertEquals("Hello, Node", hw.hello("Node"));
+ node.stop();
+ }
+
+}
diff --git a/java/sca/modules/node2-impl/src/test/resources/HelloWorld.composite b/java/sca/modules/node-impl/src/test/resources/HelloWorld.composite
index 9e3299d691..9e3299d691 100644
--- a/java/sca/modules/node2-impl/src/test/resources/HelloWorld.composite
+++ b/java/sca/modules/node-impl/src/test/resources/HelloWorld.composite
diff --git a/java/sca/modules/node2-impl/src/test/resources/META-INF/sca-contribution.xml b/java/sca/modules/node-impl/src/test/resources/META-INF/sca-contribution.xml
index 1d37bcebe0..1d37bcebe0 100644
--- a/java/sca/modules/node2-impl/src/test/resources/META-INF/sca-contribution.xml
+++ b/java/sca/modules/node-impl/src/test/resources/META-INF/sca-contribution.xml
diff --git a/java/sca/modules/node2-launcher-osgi/LICENSE b/java/sca/modules/node-launcher-osgi/LICENSE
index 6e529a25c4..6e529a25c4 100644
--- a/java/sca/modules/node2-launcher-osgi/LICENSE
+++ b/java/sca/modules/node-launcher-osgi/LICENSE
diff --git a/java/sca/modules/node2-launcher-osgi/NOTICE b/java/sca/modules/node-launcher-osgi/NOTICE
index 1325efd8bf..1325efd8bf 100644
--- a/java/sca/modules/node2-launcher-osgi/NOTICE
+++ b/java/sca/modules/node-launcher-osgi/NOTICE
diff --git a/java/sca/modules/node2-launcher-osgi/pom.xml b/java/sca/modules/node-launcher-osgi/pom.xml
index 3565aaf31a..682a1725df 100644
--- a/java/sca/modules/node2-launcher-osgi/pom.xml
+++ b/java/sca/modules/node-launcher-osgi/pom.xml
@@ -27,7 +27,7 @@
<relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>tuscany-node2-launcher-osgi</artifactId>
+ <artifactId>tuscany-node-launcher-osgi</artifactId>
<name>Apache Tuscany SCA Node OSGi Launcher</name>
<dependencies>
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/Contribution.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/Contribution.java
index 0214d5185f..0214d5185f 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/Contribution.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/Contribution.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/DomainManagerLauncher.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/DomainManagerLauncher.java
index 6c28ef8b28..6c28ef8b28 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/DomainManagerLauncher.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/DomainManagerLauncher.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java
index 0c54c89c40..0c54c89c40 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHost.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/JarFileFinder.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/JarFileFinder.java
index 38c7093a16..38c7093a16 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/JarFileFinder.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/JarFileFinder.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java
index 13af11238e..13af11238e 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherException.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherException.java
index bf17222e34..bf17222e34 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherException.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherException.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeDaemonLauncher.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeDaemonLauncher.java
index f0e4e9da70..f0e4e9da70 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeDaemonLauncher.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeDaemonLauncher.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncher.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncher.java
index 917838d521..917838d521 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncher.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncher.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherUtil.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherUtil.java
index 6aafbd91bf..4a13c0a589 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherUtil.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherUtil.java
@@ -102,7 +102,7 @@ final class NodeLauncherUtil {
Object node = bootstrapClass.getMethod("getNode").invoke(bootstrap);
try {
- Class<?> type = Class.forName("org.apache.tuscany.sca.node.SCANode2Factory");
+ Class<?> type = Class.forName("org.apache.tuscany.sca.node.SCANodeFactory");
type = type.getDeclaredClasses()[0];
return type.getMethod("createProxy", Class.class, Object.class).invoke(null, type, node);
} catch (ClassNotFoundException e) {
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeMain.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeMain.java
index 445ea80786..445ea80786 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeMain.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeMain.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeServletFilter.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeServletFilter.java
index fcbe259dba..fcbe259dba 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeServletFilter.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeServletFilter.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/OSGiHost.java b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/OSGiHost.java
index c5ea0439de..c5ea0439de 100644
--- a/java/sca/modules/node2-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/OSGiHost.java
+++ b/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/OSGiHost.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/test/java/hello/HelloWorld.java b/java/sca/modules/node-launcher-osgi/src/test/java/hello/HelloWorld.java
index 2f519cb81d..2f519cb81d 100644
--- a/java/sca/modules/node2-launcher-osgi/src/test/java/hello/HelloWorld.java
+++ b/java/sca/modules/node-launcher-osgi/src/test/java/hello/HelloWorld.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/test/java/hello/HelloWorldImpl.java b/java/sca/modules/node-launcher-osgi/src/test/java/hello/HelloWorldImpl.java
index c9a7560b12..c9a7560b12 100644
--- a/java/sca/modules/node2-launcher-osgi/src/test/java/hello/HelloWorldImpl.java
+++ b/java/sca/modules/node-launcher-osgi/src/test/java/hello/HelloWorldImpl.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHostTestCase.java b/java/sca/modules/node-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHostTestCase.java
index e5194d0e5f..e5194d0e5f 100644
--- a/java/sca/modules/node2-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHostTestCase.java
+++ b/java/sca/modules/node-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/FelixOSGiHostTestCase.java
diff --git a/java/sca/modules/node2-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherTestCase.java b/java/sca/modules/node-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherTestCase.java
index 4c8a7c4719..97976e256a 100644
--- a/java/sca/modules/node2-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherTestCase.java
+++ b/java/sca/modules/node-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherTestCase.java
@@ -22,7 +22,7 @@ package org.apache.tuscany.sca.node.osgi.launcher;
import hello.HelloWorld;
import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
@@ -51,7 +51,7 @@ public class NodeLauncherTestCase {
@Test
public void testLaunch() throws Exception {
NodeLauncher launcher = NodeLauncher.newInstance();
- SCANode2 node = launcher.createNodeFromClassLoader("HelloWorld.composite", getClass().getClassLoader());
+ SCANode node = launcher.createNodeFromClassLoader("HelloWorld.composite", getClass().getClassLoader());
node.start();
HelloWorld hw = ((SCAClient)node).getService(HelloWorld.class, "HelloWorld");
diff --git a/java/sca/modules/node2-launcher-osgi/src/test/resources/HelloWorld.composite b/java/sca/modules/node-launcher-osgi/src/test/resources/HelloWorld.composite
index 9e3299d691..9e3299d691 100644
--- a/java/sca/modules/node2-launcher-osgi/src/test/resources/HelloWorld.composite
+++ b/java/sca/modules/node-launcher-osgi/src/test/resources/HelloWorld.composite
diff --git a/java/sca/modules/node2-launcher-webapp/LICENSE b/java/sca/modules/node-launcher-webapp/LICENSE
index 6e529a25c4..6e529a25c4 100644
--- a/java/sca/modules/node2-launcher-webapp/LICENSE
+++ b/java/sca/modules/node-launcher-webapp/LICENSE
diff --git a/java/sca/modules/node2-launcher-webapp/NOTICE b/java/sca/modules/node-launcher-webapp/NOTICE
index 1325efd8bf..1325efd8bf 100644
--- a/java/sca/modules/node2-launcher-webapp/NOTICE
+++ b/java/sca/modules/node-launcher-webapp/NOTICE
diff --git a/java/sca/modules/node2-launcher-webapp/pom.xml b/java/sca/modules/node-launcher-webapp/pom.xml
index 5e09e9c58d..de5c843c17 100644
--- a/java/sca/modules/node2-launcher-webapp/pom.xml
+++ b/java/sca/modules/node-launcher-webapp/pom.xml
@@ -27,14 +27,14 @@
<relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>tuscany-node2-launcher-webapp</artifactId>
+ <artifactId>tuscany-node-launcher-webapp</artifactId>
<packaging>war</packaging>
<name>Apache Tuscany SCA Node WebApp</name>
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-launcher</artifactId>
+ <artifactId>tuscany-node-launcher</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/modules/node2-launcher-webapp/src/main/webapp/META-INF/sca-contribution.xml b/java/sca/modules/node-launcher-webapp/src/main/webapp/META-INF/sca-contribution.xml
index 78bbebbb83..78bbebbb83 100644
--- a/java/sca/modules/node2-launcher-webapp/src/main/webapp/META-INF/sca-contribution.xml
+++ b/java/sca/modules/node-launcher-webapp/src/main/webapp/META-INF/sca-contribution.xml
diff --git a/java/sca/modules/node2-launcher-webapp/src/main/webapp/WEB-INF/web.xml b/java/sca/modules/node-launcher-webapp/src/main/webapp/WEB-INF/web.xml
index 6c2c943c99..6c2c943c99 100644
--- a/java/sca/modules/node2-launcher-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/java/sca/modules/node-launcher-webapp/src/main/webapp/WEB-INF/web.xml
diff --git a/java/sca/modules/node2-launcher-webapp/src/main/webapp/index.jsp b/java/sca/modules/node-launcher-webapp/src/main/webapp/index.jsp
index 3cc6c7b504..3cc6c7b504 100644
--- a/java/sca/modules/node2-launcher-webapp/src/main/webapp/index.jsp
+++ b/java/sca/modules/node-launcher-webapp/src/main/webapp/index.jsp
diff --git a/java/sca/modules/node2-launcher/LICENSE b/java/sca/modules/node-launcher/LICENSE
index 6e529a25c4..6e529a25c4 100644
--- a/java/sca/modules/node2-launcher/LICENSE
+++ b/java/sca/modules/node-launcher/LICENSE
diff --git a/java/sca/modules/node2-launcher/NOTICE b/java/sca/modules/node-launcher/NOTICE
index 1325efd8bf..1325efd8bf 100644
--- a/java/sca/modules/node2-launcher/NOTICE
+++ b/java/sca/modules/node-launcher/NOTICE
diff --git a/java/sca/modules/node2-launcher/pom.xml b/java/sca/modules/node-launcher/pom.xml
index 6833e13c4f..4277f5109e 100644
--- a/java/sca/modules/node2-launcher/pom.xml
+++ b/java/sca/modules/node-launcher/pom.xml
@@ -27,7 +27,7 @@
<relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>tuscany-node2-launcher</artifactId>
+ <artifactId>tuscany-node-launcher</artifactId>
<name>Apache Tuscany SCA Node Launcher</name>
<dependencies>
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/Contribution.java b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/Contribution.java
index 4f4f861e2f..4f4f861e2f 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/Contribution.java
+++ b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/Contribution.java
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java
index f0c0a0a2f4..f0c0a0a2f4 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java
+++ b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/LauncherException.java b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/LauncherException.java
index 39e8d81139..39e8d81139 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/LauncherException.java
+++ b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/LauncherException.java
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java
index 2756bf2073..2756bf2073 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java
+++ b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
index 44a5430976..44a5430976 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
+++ b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java
index 6d8bcbe65c..6d8bcbe65c 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java
+++ b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncherUtil.java
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java
index eafe4ddaa0..eafe4ddaa0 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java
+++ b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeMain.java
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeServletFilter.java b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeServletFilter.java
index ad4009a1e1..ad4009a1e1 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeServletFilter.java
+++ b/java/sca/modules/node-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeServletFilter.java
diff --git a/java/sca/modules/node-manager/pom.xml b/java/sca/modules/node-manager/pom.xml
index f39c818a7e..08152a6344 100644
--- a/java/sca/modules/node-manager/pom.xml
+++ b/java/sca/modules/node-manager/pom.xml
@@ -44,13 +44,13 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-api</artifactId>
+ <artifactId>tuscany-node-api</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-launcher</artifactId>
+ <artifactId>tuscany-node-launcher</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>
@@ -81,7 +81,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-impl</artifactId>
+ <artifactId>tuscany-node-impl</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
diff --git a/java/sca/modules/pom.xml b/java/sca/modules/pom.xml
index aed561953b..7628b7c7ea 100644
--- a/java/sca/modules/pom.xml
+++ b/java/sca/modules/pom.xml
@@ -151,11 +151,11 @@
<module>implementation-xquery</module>
<module>monitor</module>
<module>monitor-logging</module>
- <module>node2-api</module>
- <module>node2-impl</module>
- <module>node2-launcher</module>
- <module>node2-launcher-osgi</module>
- <module>node2-launcher-webapp</module>
+ <module>node-api</module>
+ <module>node-impl</module>
+ <module>node-launcher</module>
+ <module>node-launcher-osgi</module>
+ <module>node-launcher-webapp</module>
<module>node-manager</module>
<module>osgi-runtime</module>
<module>policy</module>
diff --git a/java/sca/modules/runtime/pom.xml b/java/sca/modules/runtime/pom.xml
index b1f427b8f4..cde7c627b8 100644
--- a/java/sca/modules/runtime/pom.xml
+++ b/java/sca/modules/runtime/pom.xml
@@ -198,13 +198,13 @@
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-api</artifactId>
+ <artifactId>tuscany-node-api</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node2-launcher</artifactId>
+ <artifactId>tuscany-node-launcher</artifactId>
<version>1.4-SNAPSHOT</version>
</dependency>