tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r686901 [2/3] - in /tuscany/java/sca: distribution/bundle/ distribution/manifest/ itest/callablereferences/ itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/ itest/conversations-ws/ itest/conversations-ws/src/...
Date Tue, 19 Aug 2008 00:08:15 GMT
Modified: tuscany/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java (original)
+++ tuscany/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java Mon Aug 18 17:08:11 2008
@@ -24,8 +24,8 @@
 
 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;
 
 /**
  * This shows how to test the Calculator service component.
@@ -33,12 +33,12 @@
 public class XSDValidationTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode2 node;
+    private SCANode node;
     private Exception startUpException;
 
     @Override
     protected void setUp() throws Exception {
-        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
         try {
             node = nodeFactory.createSCANode(new File("src/main/resources/XsdValidation/Calculator.composite").toURL().toString(),
             		                 new SCAContribution("TestContribution", 

Propchange: tuscany/java/sca/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingFactoryImpl.java
            ('svn:mergeinfo' removed)

Propchange: tuscany/java/sca/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GDataBindingImpl.java
            ('svn:mergeinfo' removed)

Modified: tuscany/java/sca/modules/domain-manager/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/domain-manager/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/domain-manager/pom.xml (original)
+++ tuscany/java/sca/modules/domain-manager/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>

Modified: tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java (original)
+++ tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java Mon Aug 18 17:08:11 2008
@@ -21,8 +21,8 @@
 
 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 @@
  * @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 @@
             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 @@
      * Returns the node representing the domain manager.
      * @return
      */
-    public SCANode2 getNode() {
+    public SCANode getNode() {
         return node;
     }
 

Modified: tuscany/java/sca/modules/host-embedded/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-embedded/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-embedded/pom.xml (original)
+++ tuscany/java/sca/modules/host-embedded/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>

Modified: tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java (original)
+++ tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java Mon Aug 18 17:08:11 2008
@@ -43,8 +43,8 @@
 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 @@
     private List<String> contributionURLs;
 
     private CompositeActivator compositeActivator;
-    private SCANode2 node;
+    private SCANode node;
     private SCAClient client;
 
     /**
@@ -149,7 +149,7 @@
     }
 
     public void init() {
-        SCANode2Factory factory = SCANode2Factory.newInstance();
+        SCANodeFactory factory = SCANodeFactory.newInstance();
 
         List<SCAContribution> contributions = new ArrayList<SCAContribution>();
 

Modified: tuscany/java/sca/modules/implementation-node-runtime/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-node-runtime/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-node-runtime/pom.xml (original)
+++ tuscany/java/sca/modules/implementation-node-runtime/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>

Modified: tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java (original)
+++ tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java Mon Aug 18 17:08:11 2008
@@ -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 @@
  * @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 @@
      * Returns the node representing the daemon.
      * @return
      */
-    public SCANode2 getNode() {
+    public SCANode getNode() {
         return node;
     }
 

Modified: tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java (original)
+++ tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationLauncherBootstrap.java Mon Aug 18 17:08:11 2008
@@ -21,8 +21,8 @@
 
 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 @@
  */
 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 @@
      * @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 @@
      * @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 @@
      * @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 @@
      * @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 @@
      * 
      * @return
      */
-    public SCANode2 getNode() {
+    public SCANode getNode() {
         return node;
     }
 

Modified: tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java (original)
+++ tuscany/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/webapp/NodeWebAppServletHost.java Mon Aug 18 17:08:11 2008
@@ -48,8 +48,8 @@
 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 @@
     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 @@
         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 @@
      * 
      * @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;

Propchange: tuscany/java/sca/modules/node-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Aug 18 17:08:11 2008
@@ -0,0 +1,6 @@
+.settings
+target
+.classpath
+.project
+.externalToolBuilders
+maven-eclipse.xml

Propchange: tuscany/java/sca/modules/node-api/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 18 17:08:11 2008
@@ -0,0 +1 @@
+/tuscany/branches/sca-java-1.3/modules/node2-api:671193,680620-680628

Modified: tuscany/java/sca/modules/node-api/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-api/pom.xml?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-api/pom.xml (original)
+++ tuscany/java/sca/modules/node-api/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>   

Added: tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode.java?rev=686901&view=auto
==============================================================================
--- tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode.java (added)
+++ tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode.java Mon Aug 18 17:08:11 2008
@@ -0,0 +1,42 @@
+/*
+ * 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$
+ */
+public interface SCANode {
+
+    /**
+     * Start the composite loaded in the node.
+     */
+    void start();
+
+    /**
+     * Stop the composite loaded in the node.
+     */
+    void stop();
+
+}

Propchange: tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java (original)
+++ tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2.java Mon Aug 18 17:08:11 2008
@@ -26,17 +26,8 @@
  * A node is loaded with an SCA composites. It can start and stop that composite.
  *
  * @version $Rev$ $Date$
+ * @deprecated Use SCANode instead
  */
-public interface SCANode2 {
-
-    /**
-     * Start the composite loaded in the node.
-     */
-    void start();
-
-    /**
-     * Stop the composite loaded in the node.
-     */
-    void stop();
-
+@Deprecated
+public interface SCANode2 extends SCANode {
 }

Modified: tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java (original)
+++ tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java Mon Aug 18 17:08:11 2008
@@ -30,7 +30,9 @@
  * 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 @@
             }
 
             // 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();

Added: tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java?rev=686901&view=auto
==============================================================================
--- tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java (added)
+++ tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java Mon Aug 18 17:08:11 2008
@@ -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);
+
+}

Propchange: tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/SCANodeFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/java/sca/modules/node-impl/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Aug 18 17:08:11 2008
@@ -0,0 +1,17 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
+maven-eclipse.xml

Propchange: tuscany/java/sca/modules/node-impl/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 18 17:08:11 2008
@@ -0,0 +1 @@
+/tuscany/branches/sca-java-1.3/modules/node2-impl:671193,680620-680628

Modified: tuscany/java/sca/modules/node-impl/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/pom.xml?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-impl/pom.xml (original)
+++ tuscany/java/sca/modules/node-impl/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>          
         

Added: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2FactoryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2FactoryImpl.java?rev=686901&view=auto
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2FactoryImpl.java (added)
+++ tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2FactoryImpl.java Mon Aug 18 17:08:11 2008
@@ -0,0 +1,57 @@
+/*
+ * 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;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+
+/**
+ * Default implementation of an SCA node factory.
+ * 
+ * @version $Rev$ $Date$
+ * @deprecated
+ */
+@Deprecated
+public class Node2FactoryImpl extends SCANode2Factory {
+    public Node2FactoryImpl() {
+    }
+    
+    @Override
+    public SCANode2 createSCANodeFromClassLoader(String compositeURI, ClassLoader classLoader) {
+        return new Node2Impl(classLoader, compositeURI);
+    }
+
+    @Override
+    public SCANode2 createSCANodeFromURL(String configurationURI) {
+        return new Node2Impl(configurationURI);
+    }
+    
+    @Override
+    public SCANode2 createSCANode(String compositeURI, SCAContribution... contributions) {
+        return new Node2Impl(compositeURI, contributions);
+    }
+
+    @Override
+    public SCANode2 createSCANode(String compositeURI, String compositeContent, SCAContribution... contributions) {
+        return new Node2Impl(compositeURI, compositeContent, contributions);
+    }
+
+}

Propchange: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2FactoryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2FactoryImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2Impl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2Impl.java?rev=686901&view=auto
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2Impl.java (added)
+++ tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2Impl.java Mon Aug 18 17:08:11 2008
@@ -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);
+    }
+
+}

Propchange: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2Impl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/Node2Impl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java (original)
+++ tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java Mon Aug 18 17:08:11 2008
@@ -20,35 +20,35 @@
 package org.apache.tuscany.sca.node.impl;
 
 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;
 
 /**
  * Default implementation of an SCA node factory.
  * 
  * @version $Rev$ $Date$
  */
-public class NodeFactoryImpl extends SCANode2Factory {
+public class NodeFactoryImpl extends SCANodeFactory {
     public NodeFactoryImpl() {
     }
     
     @Override
-    public SCANode2 createSCANodeFromClassLoader(String compositeURI, ClassLoader classLoader) {
+    public SCANode createSCANodeFromClassLoader(String compositeURI, ClassLoader classLoader) {
         return new NodeImpl(classLoader, compositeURI);
     }
 
     @Override
-    public SCANode2 createSCANodeFromURL(String configurationURI) {
+    public SCANode createSCANodeFromURL(String configurationURI) {
         return new NodeImpl(configurationURI);
     }
     
     @Override
-    public SCANode2 createSCANode(String compositeURI, SCAContribution... contributions) {
+    public SCANode createSCANode(String compositeURI, SCAContribution... contributions) {
         return new NodeImpl(compositeURI, contributions);
     }
 
     @Override
-    public SCANode2 createSCANode(String compositeURI, String compositeContent, SCAContribution... contributions) {
+    public SCANode createSCANode(String compositeURI, String compositeContent, SCAContribution... contributions) {
         return new NodeImpl(compositeURI, compositeContent, contributions);
     }
 

Modified: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java (original)
+++ tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java Mon Aug 18 17:08:11 2008
@@ -71,7 +71,7 @@
 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 @@
  * 
  * @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 @@
         }
     }
 
+    /**
+     * 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);

Modified: tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory (original)
+++ tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory Mon Aug 18 17:08:11 2008
@@ -14,4 +14,4 @@
 # 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.NodeFactoryImpl
\ No newline at end of file
+org.apache.tuscany.sca.node.impl.Node2FactoryImpl
\ No newline at end of file

Added: tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory?rev=686901&view=auto
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory (added)
+++ tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory Mon Aug 18 17:08:11 2008
@@ -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.NodeFactoryImpl
\ No newline at end of file

Added: tuscany/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/Node2ImplTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/Node2ImplTestCase.java?rev=686901&view=auto
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/Node2ImplTestCase.java (added)
+++ tuscany/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/Node2ImplTestCase.java Mon Aug 18 17:08:11 2008
@@ -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.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.junit.Test;
+
+/**
+ * Test case for Node2Impl
+ */
+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\""
+            + " xmlns:sc=\"http://sample/composite\""
+            + " name=\"HelloWorld\">"
+            + " <component name=\"HelloWorld\">"
+            + " <implementation.java class=\"hello.HelloWorldImpl\"/>"
+            + " </component>"
+            + " </composite>";
+
+    @Test
+    public void testNodeWithCompositeContent() {
+        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);
+    }
+    
+    @Test
+    public void testNodeWithCompositeContentAndNoContribution() {
+        SCANode2Factory factory = SCANode2Factory.newInstance();
+        SCANode2 node = factory.createSCANode("HelloWorld.composite", composite);
+        testNode(node);
+    }    
+
+    @Test
+    public void testNodeWithoutCompositeURI() {
+        SCANode2Factory factory = SCANode2Factory.newInstance();
+        SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
+        SCANode2 node = factory.createSCANode(null, contribution);
+        testNode(node);
+    }
+    
+    @Test
+    public void testNodeWithCompositeURI() {
+        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);
+        testNode(node);
+    }
+
+    @Test
+    public void testNodeWithRelativeCompositeURI() {
+        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);
+        testNode(node);
+    }
+
+    @Test
+    public void testNodeWithRelativeCompositeURIAndNoContribution() {
+        SCANode2Factory factory = SCANode2Factory.newInstance();
+        String compositeURI = "HelloWorld.composite";
+        SCANode2 node = factory.createSCANode(compositeURI, new SCAContribution[0]);
+        testNode(node);
+    }
+
+    @Test
+    public void testNodeWithClassLoader() {
+        SCANode2Factory factory = SCANode2Factory.newInstance();
+        String compositeURI = "HelloWorld.composite";
+        SCANode2 node = factory.createSCANodeFromClassLoader(compositeURI, HelloWorld.class.getClassLoader());
+        testNode(node);
+    }
+
+    @Test
+    public void testNodeWithClassLoaderAndNullComposite() {
+        SCANode2Factory factory = SCANode2Factory.newInstance();
+        SCANode2 node = factory.createSCANodeFromClassLoader(null, HelloWorld.class.getClassLoader());
+        testNode(node);
+    }
+    
+    private void testNode(SCANode2 node) {
+        node.start();
+        HelloWorld hw = ((SCAClient)node).getService(HelloWorld.class, "HelloWorld");
+        Assert.assertEquals("Hello, Node", hw.hello("Node"));
+        node.stop();
+    }
+        
+}

Propchange: tuscany/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/Node2ImplTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/Node2ImplTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java (original)
+++ tuscany/java/sca/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java Mon Aug 18 17:08:11 2008
@@ -27,12 +27,12 @@
 
 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.junit.Test;
 
 /**
- * 
+ * Test case for NodeImpl
  */
 public class NodeImplTestCase {
     private static String composite =
@@ -47,69 +47,69 @@
 
     @Test
     public void testNodeWithCompositeContent() {
-        SCANode2Factory factory = new NodeFactoryImpl();
+        SCANodeFactory factory = new NodeFactoryImpl();
         SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
-        SCANode2 node = factory.createSCANode("HelloWorld.composite", composite, contribution);
+        SCANode node = factory.createSCANode("HelloWorld.composite", composite, contribution);
         testNode(node);
     }
     
     @Test
     public void testNodeWithCompositeContentAndNoContribution() {
-        SCANode2Factory factory = new NodeFactoryImpl();
-        SCANode2 node = factory.createSCANode("HelloWorld.composite", composite);
+        SCANodeFactory factory = new NodeFactoryImpl();
+        SCANode node = factory.createSCANode("HelloWorld.composite", composite);
         testNode(node);
     }    
 
     @Test
     public void testNodeWithoutCompositeURI() {
-        SCANode2Factory factory = new NodeFactoryImpl();
+        SCANodeFactory factory = new NodeFactoryImpl();
         SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
-        SCANode2 node = factory.createSCANode(null, contribution);
+        SCANode node = factory.createSCANode(null, contribution);
         testNode(node);
     }
     
     @Test
     public void testNodeWithCompositeURI() {
-        SCANode2Factory factory = new NodeFactoryImpl();
+        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();
-        SCANode2 node = factory.createSCANode(compositeURI, contribution);
+        SCANode node = factory.createSCANode(compositeURI, contribution);
         testNode(node);
     }
 
     @Test
     public void testNodeWithRelativeCompositeURI() {
-        SCANode2Factory factory = new NodeFactoryImpl();
+        SCANodeFactory factory = new NodeFactoryImpl();
         SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
         String compositeURI = "HelloWorld.composite";
-        SCANode2 node = factory.createSCANode(compositeURI, contribution);
+        SCANode node = factory.createSCANode(compositeURI, contribution);
         testNode(node);
     }
 
     @Test
     public void testNodeWithRelativeCompositeURIAndNoContribution() {
-        SCANode2Factory factory = new NodeFactoryImpl();
+        SCANodeFactory factory = new NodeFactoryImpl();
         String compositeURI = "HelloWorld.composite";
-        SCANode2 node = factory.createSCANode(compositeURI, new SCAContribution[0]);
+        SCANode node = factory.createSCANode(compositeURI, new SCAContribution[0]);
         testNode(node);
     }
 
     @Test
     public void testNodeWithClassLoader() {
-        SCANode2Factory factory = new NodeFactoryImpl();
+        SCANodeFactory factory = new NodeFactoryImpl();
         String compositeURI = "HelloWorld.composite";
-        SCANode2 node = factory.createSCANodeFromClassLoader(compositeURI, HelloWorld.class.getClassLoader());
+        SCANode node = factory.createSCANodeFromClassLoader(compositeURI, HelloWorld.class.getClassLoader());
         testNode(node);
     }
 
     @Test
     public void testNodeWithClassLoaderAndNullComposite() {
-        SCANode2Factory factory = new NodeFactoryImpl();
-        SCANode2 node = factory.createSCANodeFromClassLoader(null, HelloWorld.class.getClassLoader());
+        SCANodeFactory factory = new NodeFactoryImpl();
+        SCANode node = factory.createSCANodeFromClassLoader(null, HelloWorld.class.getClassLoader());
         testNode(node);
     }
     
-    private void testNode(SCANode2 node) {
+    private void testNode(SCANode node) {
         node.start();
         HelloWorld hw = ((SCAClient)node).getService(HelloWorld.class, "HelloWorld");
         Assert.assertEquals("Hello, Node", hw.hello("Node"));

Propchange: tuscany/java/sca/modules/node-launcher/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Aug 18 17:08:11 2008
@@ -0,0 +1,17 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
+maven-eclipse.xml

Propchange: tuscany/java/sca/modules/node-launcher/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 18 17:08:11 2008
@@ -0,0 +1 @@
+/tuscany/branches/sca-java-1.3/modules/node2-launcher:671193,680620-680628

Propchange: tuscany/java/sca/modules/node-launcher-osgi/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Aug 18 17:08:11 2008
@@ -0,0 +1,17 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
+maven-eclipse.xml

Propchange: tuscany/java/sca/modules/node-launcher-osgi/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 18 17:08:11 2008
@@ -0,0 +1 @@
+/tuscany/branches/sca-java-1.3/modules/node2-launcher-osgi:671193,680620-680628

Modified: tuscany/java/sca/modules/node-launcher-osgi/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-launcher-osgi/pom.xml?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-launcher-osgi/pom.xml (original)
+++ tuscany/java/sca/modules/node-launcher-osgi/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>   

Modified: tuscany/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherUtil.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherUtil.java?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherUtil.java (original)
+++ tuscany/java/sca/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherUtil.java Mon Aug 18 17:08:11 2008
@@ -102,7 +102,7 @@
 
             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) {

Modified: tuscany/java/sca/modules/node-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherTestCase.java?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherTestCase.java (original)
+++ tuscany/java/sca/modules/node-launcher-osgi/src/test/java/org/apache/tuscany/sca/node/osgi/launcher/NodeLauncherTestCase.java Mon Aug 18 17:08:11 2008
@@ -22,7 +22,7 @@
 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 @@
     @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");

Propchange: tuscany/java/sca/modules/node-launcher-webapp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Aug 18 17:08:11 2008
@@ -0,0 +1,17 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
+maven-eclipse.xml

Propchange: tuscany/java/sca/modules/node-launcher-webapp/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Aug 18 17:08:11 2008
@@ -0,0 +1 @@
+/tuscany/branches/sca-java-1.3/modules/node2-launcher-webapp:671193,680620-680628

Modified: tuscany/java/sca/modules/node-launcher-webapp/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-launcher-webapp/pom.xml?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-launcher-webapp/pom.xml (original)
+++ tuscany/java/sca/modules/node-launcher-webapp/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>

Modified: tuscany/java/sca/modules/node-launcher/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-launcher/pom.xml?rev=686901&r1=686875&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-launcher/pom.xml (original)
+++ tuscany/java/sca/modules/node-launcher/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>   

Modified: tuscany/java/sca/modules/node-manager/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-manager/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-manager/pom.xml (original)
+++ tuscany/java/sca/modules/node-manager/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>

Modified: tuscany/java/sca/modules/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/pom.xml (original)
+++ tuscany/java/sca/modules/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>

Modified: tuscany/java/sca/modules/runtime/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/runtime/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/modules/runtime/pom.xml (original)
+++ tuscany/java/sca/modules/runtime/pom.xml Mon Aug 18 17:08:11 2008
@@ -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>    
         

Modified: tuscany/java/sca/samples/calculator-distributed/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/calculator-distributed/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/calculator-distributed/pom.xml (original)
+++ tuscany/java/sca/samples/calculator-distributed/pom.xml Mon Aug 18 17:08:11 2008
@@ -39,13 +39,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>    
         

Modified: tuscany/java/sca/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java (original)
+++ tuscany/java/sca/samples/calculator-distributed/src/main/java/node/LaunchCalculatorNodeA.java Mon Aug 18 17:08:11 2008
@@ -20,7 +20,7 @@
 package node;
 
 import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode;
 import org.apache.tuscany.sca.node.launcher.NodeLauncher;
 import org.osoa.sca.ServiceRuntimeException;
 
@@ -29,7 +29,7 @@
 public class LaunchCalculatorNodeA {
     public static void main(String[] args) throws Exception {
         
-        SCANode2 node = null;
+        SCANode node = null;
         try {
             
             NodeLauncher nodeLauncher = NodeLauncher.newInstance();

Modified: tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java (original)
+++ tuscany/java/sca/samples/calculator-distributed/src/test/java/calculator/CalculatorDistributedTestCase.java Mon Aug 18 17:08:11 2008
@@ -22,8 +22,8 @@
 import junit.framework.Assert;
 
 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;
 import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -35,10 +35,10 @@
  */
 public class CalculatorDistributedTestCase {
 
-    private static SCANode2 manager;
-    private static SCANode2 nodeA;
-    private static SCANode2 nodeB;
-    private static SCANode2 nodeC;
+    private static SCANode manager;
+    private static SCANode nodeA;
+    private static SCANode nodeB;
+    private static SCANode nodeC;
 
     private static CalculatorService calculatorService;
     
@@ -53,7 +53,7 @@
             manager = managerLauncher.createDomainManager();
             manager.start();
             
-            SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
             nodeC  = nodeFactory.createSCANodeFromURL("http://localhost:9990/node-config/NodeC");
             nodeB  = nodeFactory.createSCANodeFromURL("http://localhost:9990/node-config/NodeB");
             nodeA  = nodeFactory.createSCANodeFromURL("http://localhost:9990/node-config/NodeA");

Modified: tuscany/java/sca/samples/calculator/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/calculator/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/calculator/pom.xml (original)
+++ tuscany/java/sca/samples/calculator/pom.xml Mon Aug 18 17:08:11 2008
@@ -38,13 +38,13 @@
     <dependencies>
         <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-impl</artifactId>
+            <artifactId>tuscany-node-impl</artifactId>
             <version>1.4-SNAPSHOT</version>
             <scope>runtime</scope>
         </dependency>

Modified: tuscany/java/sca/samples/calculator/src/main/java/calculator/CalculatorClient.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/calculator/src/main/java/calculator/CalculatorClient.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/calculator/src/main/java/calculator/CalculatorClient.java (original)
+++ tuscany/java/sca/samples/calculator/src/main/java/calculator/CalculatorClient.java Mon Aug 18 17:08:11 2008
@@ -20,8 +20,8 @@
 package calculator;
 
 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;
 
 /**
  * This client program shows how to create an SCA runtime, start it,
@@ -30,8 +30,8 @@
 public class CalculatorClient {
     public static void main(String[] args) throws Exception {
 
-        SCANode2Factory factory = SCANode2Factory.newInstance();
-        SCANode2 node = factory.createSCANodeFromClassLoader("Calculator.composite", CalculatorClient.class.getClassLoader());
+        SCANodeFactory factory = SCANodeFactory.newInstance();
+        SCANode node = factory.createSCANodeFromClassLoader("Calculator.composite", CalculatorClient.class.getClassLoader());
         node.start();
         
         CalculatorService calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");

Modified: tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java (original)
+++ tuscany/java/sca/samples/calculator/src/test/java/calculator/CalculatorTestCase.java Mon Aug 18 17:08:11 2008
@@ -21,8 +21,8 @@
 import junit.framework.TestCase;
 
 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;
 
 /**
  * This shows how to test the Calculator service component.
@@ -30,11 +30,11 @@
 public class CalculatorTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    private SCANode2 node;
+    private SCANode node;
 
     @Override
     protected void setUp() throws Exception {
-        SCANode2Factory factory = SCANode2Factory.newInstance();
+        SCANodeFactory factory = SCANodeFactory.newInstance();
         node = factory.createSCANodeFromClassLoader("Calculator.composite", getClass().getClassLoader());
         node.start();
         

Modified: tuscany/java/sca/samples/callback-ws-client/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/callback-ws-client/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/callback-ws-client/pom.xml (original)
+++ tuscany/java/sca/samples/callback-ws-client/pom.xml Mon Aug 18 17:08:11 2008
@@ -38,7 +38,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>
         

Modified: tuscany/java/sca/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java (original)
+++ tuscany/java/sca/samples/callback-ws-client/src/main/java/myapp/MyClientImpl.java Mon Aug 18 17:08:11 2008
@@ -22,8 +22,8 @@
 import myserver.MyServiceCallback;
 
 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;
 import org.osoa.sca.annotations.Reference;
 import org.osoa.sca.annotations.Scope;
 import org.osoa.sca.annotations.Service;
@@ -49,14 +49,14 @@
     }
 
     public static void main(String[] args) throws Exception {
-        SCANode2 node = SCANode2Factory.newInstance().createSCANodeFromClassLoader("myapp.composite", MyClientImpl.class.getClassLoader());
+        SCANode node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("myapp.composite", MyClientImpl.class.getClassLoader());
         node.start();
         run(node);
         System.out.println("Closing the domain");
         node.stop();
     }
 
-    public static void run(SCANode2 node) throws InterruptedException {
+    public static void run(SCANode node) throws InterruptedException {
         MyClient myClient = ((SCAClient)node).getService(MyClient.class, "MyClientComponent");
         myClient.aClientMethod();
         Thread.sleep(5000);  // don't exit before callback arrives

Modified: tuscany/java/sca/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java (original)
+++ tuscany/java/sca/samples/callback-ws-client/src/test/java/myapp/CallbackClientTestCase.java Mon Aug 18 17:08:11 2008
@@ -18,8 +18,8 @@
  */
 package myapp;
 
-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.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -29,12 +29,12 @@
  */
 public class CallbackClientTestCase {
 
-    private SCANode2 node;
+    private SCANode node;
 
     @Before
     public void startServer() throws Exception {
         try {
-            node = SCANode2Factory.newInstance().createSCANodeFromClassLoader(null, getClass().getClassLoader());
+            node = SCANodeFactory.newInstance().createSCANodeFromClassLoader(null, getClass().getClassLoader());
             node.start();
         } catch (Exception ex) {
             System.out.println(ex.toString());

Modified: tuscany/java/sca/samples/callback-ws-service/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/callback-ws-service/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/callback-ws-service/pom.xml (original)
+++ tuscany/java/sca/samples/callback-ws-service/pom.xml Mon Aug 18 17:08:11 2008
@@ -38,7 +38,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>
 

Modified: tuscany/java/sca/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java (original)
+++ tuscany/java/sca/samples/callback-ws-service/src/main/java/myserver/CallbackServer.java Mon Aug 18 17:08:11 2008
@@ -20,8 +20,8 @@
 
 import java.io.IOException;
 
-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;
 
 /**
  * This server program shows how to create and start an SCA runtime that
@@ -31,7 +31,7 @@
 
     public static void main(String[] args) throws Exception {
         
-        SCANode2 node = SCANode2Factory.newInstance().createSCANodeFromClassLoader("callbackws.composite", null);
+        SCANode node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("callbackws.composite", null);
         node.start();
 
         try {

Modified: tuscany/java/sca/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java (original)
+++ tuscany/java/sca/samples/callback-ws-service/src/test/java/myserver/CallbackServerTestCase.java Mon Aug 18 17:08:11 2008
@@ -21,8 +21,8 @@
 import java.io.IOException;
 import java.net.Socket;
 
-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.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -32,11 +32,11 @@
  */
 public class CallbackServerTestCase {
 
-    private SCANode2 node;
+    private SCANode node;
 
     @Before
     public void startServer() throws Exception {
-        node = SCANode2Factory.newInstance().createSCANodeFromClassLoader("callbackws.composite", null);
+        node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("callbackws.composite", null);
         node.start();
     }
 

Modified: tuscany/java/sca/samples/customer-dojo/build-dependency.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/customer-dojo/build-dependency.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/customer-dojo/build-dependency.xml (original)
+++ tuscany/java/sca/samples/customer-dojo/build-dependency.xml Mon Aug 18 17:08:11 2008
@@ -49,6 +49,7 @@
         <include name="tuscany-implementation-java-1.4-SNAPSHOT.jar"/>
         <include name="tuscany-implementation-java-runtime-1.4-SNAPSHOT.jar"/>
         <include name="tuscany-implementation-java-xml-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-implementation-node-1.4-SNAPSHOT.jar"/>
         <include name="tuscany-implementation-resource-1.4-SNAPSHOT.jar"/>
         <include name="tuscany-implementation-resource-runtime-1.4-SNAPSHOT.jar"/>
         <include name="tuscany-interface-1.4-SNAPSHOT.jar"/>
@@ -56,6 +57,8 @@
         <include name="tuscany-interface-java-jaxws-1.4-SNAPSHOT.jar"/>
         <include name="tuscany-interface-java-xml-1.4-SNAPSHOT.jar"/>
         <include name="tuscany-monitor-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-node2-api-1.4-SNAPSHOT.jar"/>
+        <include name="tuscany-node2-impl-1.4-SNAPSHOT.jar"/>
         <include name="tuscany-policy-1.4-SNAPSHOT.jar"/>
         <include name="tuscany-policy-xml-1.4-SNAPSHOT.jar"/>
         <include name="tuscany-sca-api-1.4-SNAPSHOT.jar"/>

Modified: tuscany/java/sca/samples/domain-management/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/domain-management/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/domain-management/pom.xml (original)
+++ tuscany/java/sca/samples/domain-management/pom.xml Mon Aug 18 17:08:11 2008
@@ -86,13 +86,13 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-node2-launcher</artifactId>
+            <artifactId>tuscany-node-launcher</artifactId>
             <version>1.4-SNAPSHOT</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-node2-api</artifactId>
+            <artifactId>tuscany-node-api</artifactId>
             <version>1.4-SNAPSHOT</version>
         </dependency>    
         

Modified: tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java (original)
+++ tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java Mon Aug 18 17:08:11 2008
@@ -71,7 +71,7 @@
 import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
-import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode;
 import org.apache.tuscany.sca.node.launcher.NodeLauncher;
 import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
 import org.apache.tuscany.sca.workspace.Workspace;
@@ -260,7 +260,7 @@
         System.out.println(print(domainComposite));
         
         // Now start our SCA nodes
-        List<SCANode2> runtimeNodes = new ArrayList<SCANode2>();
+        List<SCANode> runtimeNodes = new ArrayList<SCANode>();
         NodeLauncher launcher = NodeLauncher.newInstance();
         for (Component node: cloudComposite.getComponents()) {
             
@@ -286,7 +286,7 @@
                 Contribution dependency = dependencies.get(c);
                 contributions[c] = new org.apache.tuscany.sca.node.launcher.Contribution(dependency.getURI(), dependency.getLocation());
             }
-            SCANode2 runtimeNode = launcher.createNode("http://sample/" + node.getName(), print(runnable), contributions);
+            SCANode runtimeNode = launcher.createNode("http://sample/" + node.getName(), print(runnable), contributions);
             
             // Start the node
             runtimeNode.start();
@@ -296,7 +296,7 @@
         System.out.println("Nodes are running, press enter to stop...");
         System.in.read();
         
-        for (SCANode2 runtimeNode: runtimeNodes) {
+        for (SCANode runtimeNode: runtimeNodes) {
             runtimeNode.stop();
         }
     }

Modified: tuscany/java/sca/samples/store-distributed/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/store-distributed/pom.xml?rev=686901&r1=686900&r2=686901&view=diff
==============================================================================
--- tuscany/java/sca/samples/store-distributed/pom.xml (original)
+++ tuscany/java/sca/samples/store-distributed/pom.xml Mon Aug 18 17:08:11 2008
@@ -39,13 +39,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>    
         



Mime
View raw message