Author: antelder
Date: Tue Feb 24 10:03:49 2009
New Revision: 747323

URL: http://svn.apache.org/viewvc?rev=747323&view=rev
Log:
Start to bring up a bpel sample in 2.x

Added:
    tuscany/java/sca/samples/helloworld-bpel/   (props changed)
      - copied from r747305, 
tuscany/branches/sca-equinox/samples/helloworld-bpel/
    tuscany/java/sca/samples/helloworld-bpel/src/main/java/helloworld/Hello.java
    tuscany/java/sca/samples/helloworld-bpel/src/main/resources/META-INF/
    
tuscany/java/sca/samples/helloworld-bpel/src/main/resources/META-INF/sca-contribution.xml
Removed:
    tuscany/java/sca/samples/helloworld-bpel/src/main/resources/deploy.xml
    
tuscany/java/sca/samples/helloworld-bpel/src/main/resources/helloworld.componentType
Modified:
    tuscany/java/sca/samples/helloworld-bpel/pom.xml
    
tuscany/java/sca/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java
    
tuscany/java/sca/samples/helloworld-bpel/src/main/resources/helloworld.composite
    
tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java

Propchange: tuscany/java/sca/samples/helloworld-bpel/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Feb 24 10:03:49 2009
@@ -0,0 +1,18 @@
+target
+work
+dojo
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+derby.log
+.externalToolBuilders
+maven-eclipse.xml

Propchange: tuscany/java/sca/samples/helloworld-bpel/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Feb 24 10:03:49 2009
@@ -0,0 +1,2 @@
+/tuscany/branches/sca-java-1.3/samples/helloworld-bpel:671193
+/tuscany/java/sca/samples/helloworld-bpel:694837-694843

Modified: tuscany/java/sca/samples/helloworld-bpel/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/samples/helloworld-bpel/pom.xml?rev=747323&r1=747305&r2=747323&view=diff
==============================================================================
--- tuscany/java/sca/samples/helloworld-bpel/pom.xml (original)
+++ tuscany/java/sca/samples/helloworld-bpel/pom.xml Tue Feb 24 10:03:49 2009
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.tuscany.sca</groupId>
         <artifactId>tuscany-sca</artifactId>
-        <version>1.4-EQUINOX-SNAPSHOT</version>
+        <version>2.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <artifactId>sample-helloworld-bpel</artifactId>
@@ -38,29 +38,29 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-host-embedded</artifactId>
-            <version>1.4-EQUINOX-SNAPSHOT</version>
+            <artifactId>tuscany-node-impl</artifactId>
+            <version>2.0-SNAPSHOT</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-implementation-java-runtime</artifactId>
-            <version>1.4-EQUINOX-SNAPSHOT</version>
+            <version>2.0-SNAPSHOT</version>
             <scope>runtime</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-implementation-bpel-ode</artifactId>
-            <version>1.4-EQUINOX-SNAPSHOT</version>
+            <version>2.0-SNAPSHOT</version>
             <scope>runtime</scope>
         </dependency>
 
-        <dependency>
+        <!-- dependency>
             <groupId>org.apache.tuscany.sdo</groupId>
             <artifactId>tuscany-sdo-impl</artifactId>
             <version>1.1.1</version>
-        </dependency>
+        </dependency -->
 
                <dependency>
                    <groupId>xerces</groupId>
@@ -75,17 +75,17 @@
             <scope>test</scope>
         </dependency>
         <!--  dependencies that must be present in order that the build 
scripts work -->
-        <dependency>
+        <!-- dependency>
             <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-wsdl2java</artifactId>
-            <version>1.4-EQUINOX-SNAPSHOT</version>
+            <version>2.0-SNAPSHOT</version>
         </dependency> 
                 
         <dependency>
             <groupId>org.apache.tuscany.sdo</groupId>
             <artifactId>tuscany-sdo-tools</artifactId>
             <version>1.1.1</version>
-        </dependency>  
+        </dependency -->  
         
         <dependency>
             <groupId>org.codehaus.woodstox</groupId>
@@ -155,7 +155,7 @@
                                        </execution>
                                </executions>
                        </plugin>
-                       <plugin>
+                       <!-- plugin>
                                <groupId>org.apache.tuscany.sdo</groupId>
                                <artifactId>tuscany-sdo-plugin</artifactId>
                                <version>1.1.1</version>
@@ -176,11 +176,11 @@
                                                </goals>
                                        </execution>
                                </executions>
-                       </plugin>
-                       <plugin>
+                       </plugin -->
+                       <!-- plugin>
                                <groupId>org.apache.tuscany.sca</groupId>
                                <artifactId>tuscany-maven-wsdl2java</artifactId>
-                               <version>1.4-EQUINOX-SNAPSHOT</version>
+                               <version>2.0-SNAPSHOT</version>
                                <executions>
                                        <execution>
                                                <configuration>
@@ -191,7 +191,7 @@
                                                </goals>
                                        </execution>
                                </executions>
-                       </plugin>
+                       </plugin -->
                </plugins>
     </build>
 

Modified: 
tuscany/java/sca/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java?rev=747323&r1=747305&r2=747323&view=diff
==============================================================================
--- 
tuscany/java/sca/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java
 (original)
+++ 
tuscany/java/sca/samples/helloworld-bpel/src/main/java/helloworld/BPELClient.java
 Tue Feb 24 10:03:49 2009
@@ -19,8 +19,8 @@
 
 package helloworld;
 
-import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 /**
  * Simple BPEL sample application invoking a helloworld 
@@ -30,13 +30,15 @@
 public class BPELClient {
     public static void main(String[] args) throws Exception {
 
-        SCADomain scaDomain = SCADomain.newInstance("helloworld.composite");
-        HelloPortType bpelService = scaDomain.getService(HelloPortType.class, 
"BPELHelloWorldComponent");
+        Node node = NodeFactory.newInstance().createNode();
+        node.start();
+        
+        Hello bpelService = node.getService(Hello.class, 
"BPELHelloWorldComponent");
         
         String result = bpelService.hello("Hello");
         System.out.println(result);
         
-        scaDomain.close();
+        node.stop();
 
         System.exit(0);
     }

Added: 
tuscany/java/sca/samples/helloworld-bpel/src/main/java/helloworld/Hello.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/samples/helloworld-bpel/src/main/java/helloworld/Hello.java?rev=747323&view=auto
==============================================================================
--- 
tuscany/java/sca/samples/helloworld-bpel/src/main/java/helloworld/Hello.java 
(added)
+++ 
tuscany/java/sca/samples/helloworld-bpel/src/main/java/helloworld/Hello.java 
Tue Feb 24 10:03:49 2009
@@ -0,0 +1,29 @@
+/*
+ * 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 helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+...@remotable
+public interface Hello {
+    
+    String hello(String name);
+
+}

Added: 
tuscany/java/sca/samples/helloworld-bpel/src/main/resources/META-INF/sca-contribution.xml
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/samples/helloworld-bpel/src/main/resources/META-INF/sca-contribution.xml?rev=747323&view=auto
==============================================================================
--- 
tuscany/java/sca/samples/helloworld-bpel/src/main/resources/META-INF/sca-contribution.xml
 (added)
+++ 
tuscany/java/sca/samples/helloworld-bpel/src/main/resources/META-INF/sca-contribution.xml
 Tue Feb 24 10:03:49 2009
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * 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.    
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0";
+              xmlns:sample="http://bpel";>
+   <deployable composite="sample:bpel"/>
+</contribution>
\ No newline at end of file

Modified: 
tuscany/java/sca/samples/helloworld-bpel/src/main/resources/helloworld.composite
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/samples/helloworld-bpel/src/main/resources/helloworld.composite?rev=747323&r1=747305&r2=747323&view=diff
==============================================================================
--- 
tuscany/java/sca/samples/helloworld-bpel/src/main/resources/helloworld.composite
 (original)
+++ 
tuscany/java/sca/samples/helloworld-bpel/src/main/resources/helloworld.composite
 Tue Feb 24 10:03:49 2009
@@ -18,9 +18,9 @@
     * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
-       targetNamespace="http://bpel";
-    
xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld";
-    name="bpel">
+      targetNamespace="http://bpel";
+      
xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld";
+      name="bpel">
     
     <component name="BPELHelloWorldComponent">
         <implementation.bpel process="hns:HelloWorld"/>

Modified: 
tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java?rev=747323&r1=747305&r2=747323&view=diff
==============================================================================
--- 
tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java
 (original)
+++ 
tuscany/java/sca/samples/helloworld-bpel/src/test/java/helloworld/BPELHelloWorldTestCase.java
 Tue Feb 24 10:03:49 2009
@@ -21,8 +21,9 @@
 
 import junit.framework.TestCase;
 
-import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 /**
  * Tests the BPEL service
@@ -31,17 +32,19 @@
  */
 public class BPELHelloWorldTestCase extends TestCase {
 
-    private SCADomain scaDomain;
-    HelloPortType bpelService = null;
+    private Node node;
+    private Hello bpelService;
     
     /**
      * @throws java.lang.Exception
      */
     @Override
     protected void setUp() throws Exception {
-        scaDomain = SCADomain.newInstance("helloworld.composite");
-        bpelService = scaDomain.getService(HelloPortType.class, 
"BPELHelloWorldComponent");
-
+        
+        node = NodeFactory.newInstance().createNode();
+        node.start();
+        
+        bpelService = node.getService(Hello.class, "BPELHelloWorldComponent");
     }
 
     /**
@@ -49,7 +52,7 @@
      */
     @Override
     protected void tearDown() throws Exception {
-        scaDomain.close();
+        node.stop();
     }
     
     public void testInvoke() throws Exception {


Reply via email to