tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r653108 - in /incubator/tuscany/java/sca/tutorial: ./ assets/services/ assets/services/db/ domain/ domain/cloud/ store-client/ store-client/META-INF/ store-client/client/ store-client/launch/ store-client/services/ store-supplier/ store-tes...
Date Sat, 03 May 2008 19:17:05 GMT
Author: jsdelfino
Date: Sat May  3 12:17:05 2008
New Revision: 653108

URL: http://svn.apache.org/viewvc?rev=653108&view=rev
Log:
Adding a client module and a test module to test the integration of the tutorial domain.

Added:
    incubator/tuscany/java/sca/tutorial/domain/cloud/StoreClientNode.composite   (with props)
    incubator/tuscany/java/sca/tutorial/store-client/
      - copied from r652985, incubator/tuscany/java/sca/tutorial/store-supplier/
    incubator/tuscany/java/sca/tutorial/store-client/client/
    incubator/tuscany/java/sca/tutorial/store-client/client/Shopper.java   (with props)
    incubator/tuscany/java/sca/tutorial/store-client/client/ShopperImpl.java   (with props)
    incubator/tuscany/java/sca/tutorial/store-client/launch/
    incubator/tuscany/java/sca/tutorial/store-client/launch/LaunchStoreClientNode.java   (with props)
    incubator/tuscany/java/sca/tutorial/store-client/services/
    incubator/tuscany/java/sca/tutorial/store-client/services/Cart.java   (with props)
    incubator/tuscany/java/sca/tutorial/store-client/services/Catalog.java   (with props)
    incubator/tuscany/java/sca/tutorial/store-client/services/Item.java   (with props)
    incubator/tuscany/java/sca/tutorial/store-client/services/Total.java   (with props)
    incubator/tuscany/java/sca/tutorial/store-client/store-client.composite   (with props)
    incubator/tuscany/java/sca/tutorial/store-test/
      - copied from r652985, incubator/tuscany/java/sca/tutorial/store-supplier/
    incubator/tuscany/java/sca/tutorial/store-test/client/
    incubator/tuscany/java/sca/tutorial/store-test/client/Shopper.java   (with props)
    incubator/tuscany/java/sca/tutorial/store-test/test/
    incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java   (with props)
Removed:
    incubator/tuscany/java/sca/tutorial/store-client/store-supplier.composite
    incubator/tuscany/java/sca/tutorial/store-test/store-supplier.composite
Modified:
    incubator/tuscany/java/sca/tutorial/assets/services/ShoppingCartImpl.java
    incubator/tuscany/java/sca/tutorial/assets/services/db/ShoppingCartTableImpl.java
    incubator/tuscany/java/sca/tutorial/domain/cloud.composite
    incubator/tuscany/java/sca/tutorial/domain/domain.composite
    incubator/tuscany/java/sca/tutorial/domain/pom.xml
    incubator/tuscany/java/sca/tutorial/domain/workspace.xml
    incubator/tuscany/java/sca/tutorial/pom.xml
    incubator/tuscany/java/sca/tutorial/store-client/META-INF/sca-contribution.xml
    incubator/tuscany/java/sca/tutorial/store-client/pom.xml
    incubator/tuscany/java/sca/tutorial/store-supplier/store-supplier.composite
    incubator/tuscany/java/sca/tutorial/store-test/pom.xml

Modified: incubator/tuscany/java/sca/tutorial/assets/services/ShoppingCartImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/assets/services/ShoppingCartImpl.java?rev=653108&r1=653107&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/assets/services/ShoppingCartImpl.java (original)
+++ incubator/tuscany/java/sca/tutorial/assets/services/ShoppingCartImpl.java Sat May  3 12:17:05 2008
@@ -36,7 +36,7 @@
     private Map<String, Item> cart;
     
     @Init
-    protected void init() {
+    public void init() {
         cart = new HashMap<String, Item>();
     }
 

Modified: incubator/tuscany/java/sca/tutorial/assets/services/db/ShoppingCartTableImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/assets/services/db/ShoppingCartTableImpl.java?rev=653108&r1=653107&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/assets/services/db/ShoppingCartTableImpl.java (original)
+++ incubator/tuscany/java/sca/tutorial/assets/services/db/ShoppingCartTableImpl.java Sat May  3 12:17:05 2008
@@ -48,7 +48,10 @@
     @Init
     public void init() throws Exception {
         Class.forName("org.apache.derby.jdbc.EmbeddedDriver", true, getClass().getClassLoader());
-        connection = DriverManager.getConnection("jdbc:derby:" + database, "", "");
+        String baseDir = System.getProperty("basedir");
+        String url = "jdbc:derby:" + (baseDir != null? baseDir + "/" + database : database);
+        System.out.println("Connecting to database: " + url);
+        connection = DriverManager.getConnection(url, "", "");
     }
 
     public Entry<String, Item>[] getAll() {

Modified: incubator/tuscany/java/sca/tutorial/domain/cloud.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/cloud.composite?rev=653108&r1=653107&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/cloud.composite (original)
+++ incubator/tuscany/java/sca/tutorial/domain/cloud.composite Sat May  3 12:17:05 2008
@@ -24,6 +24,7 @@
   <include name="ns2:CatalogsNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
   <include name="ns2:StoreNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
   <include name="ns2:StoreMergerNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
+  <include name="ns2:StoreClientNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
   <include name="ns2:StoreDBNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
   <include name="ns2:StoreSupplierNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>
   <include name="ns2:StoreEUNode" uri="http://tuscany.apache.org/cloud" xmlns:ns2="http://tuscany.apache.org/cloud"/>

Added: incubator/tuscany/java/sca/tutorial/domain/cloud/StoreClientNode.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/cloud/StoreClientNode.composite?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/cloud/StoreClientNode.composite (added)
+++ incubator/tuscany/java/sca/tutorial/domain/cloud/StoreClientNode.composite Sat May  3 12:17:05 2008
@@ -0,0 +1,33 @@
+<?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.    
+-->
+<composite	xmlns="http://www.osoa.org/xmlns/sca/1.0"
+		xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+		targetNamespace="http://tuscany.apache.org/cloud"
+		xmlns:s="http://store"
+		name="StoreClientNode">
+
+	<component name="StoreClientNode">
+		<t:implementation.node uri="store-client" composite="s:store-client"/>
+		<service name="Node">
+			<t:binding.http uri="http://localhost:8107"/>
+		</service>
+	</component> 
+
+</composite>

Propchange: incubator/tuscany/java/sca/tutorial/domain/cloud/StoreClientNode.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/domain/cloud/StoreClientNode.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/tutorial/domain/domain.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/domain.composite?rev=653108&r1=653107&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/domain.composite (original)
+++ incubator/tuscany/java/sca/tutorial/domain/domain.composite Sat May  3 12:17:05 2008
@@ -22,6 +22,7 @@
   xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:ns1="http://www.osoa.org/xmlns/sca/1.0">
   <include name="ns2:store" uri="store" xmlns:ns2="http://store"/>
   <include name="ns2:store-merger" uri="store-merger" xmlns:ns2="http://store"/>
+  <include name="ns2:store-client" uri="store-client" xmlns:ns2="http://store"/>
   <include name="ns2:store-db" uri="store-db" xmlns:ns2="http://store"/>
   <include name="ns2:store-supplier" uri="store-supplier" xmlns:ns2="http://store"/>
   <include name="ns2:store-market" uri="store-market" xmlns:ns2="http://store"/> 

Modified: incubator/tuscany/java/sca/tutorial/domain/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/pom.xml?rev=653108&r1=653107&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/domain/pom.xml Sat May  3 12:17:05 2008
@@ -72,6 +72,13 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-resource</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-binding-atom-abdera</artifactId>
             <version>2.0-incubating-SNAPSHOT</version>
             <scope>runtime</scope>

Modified: incubator/tuscany/java/sca/tutorial/domain/workspace.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/domain/workspace.xml?rev=653108&r1=653107&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/domain/workspace.xml (original)
+++ incubator/tuscany/java/sca/tutorial/domain/workspace.xml Sat May  3 12:17:05 2008
@@ -21,6 +21,7 @@
   <contribution location="file:../assets/target/tutorial-assets.jar" uri="assets"/>
   <contribution location="file:../store/target/tutorial-store.jar" uri="store"/>
   <contribution location="file:../store-merger/target/tutorial-store-merger.jar" uri="store-merger"/>
+  <contribution location="file:../store-client/target/tutorial-store-client.jar" uri="store-client"/>
   <contribution location="file:../store-db/target/tutorial-store-db.jar" uri="store-db"/>
   <contribution location="file:../store-supplier/target/tutorial-store-supplier.jar" uri="store-supplier"/>
   <contribution location="file:../store-market/target/tutorial-store-market.jar" uri="store-market"/> 

Modified: incubator/tuscany/java/sca/tutorial/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/pom.xml?rev=653108&r1=653107&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/pom.xml Sat May  3 12:17:05 2008
@@ -40,6 +40,7 @@
                 <module>assets</module>
                 <module>store</module>
                 <module>store-merger</module>
+                <module>store-client</module>
                 <module>store-db</module>
                 <module>store-supplier</module>
                 <module>store-market</module>
@@ -49,6 +50,7 @@
                 <module>catalog-webapp</module>
                 <module>catalog-ejb</module>
                 <module>catalog-mediation</module>
+                <module>store-test</module>
             </modules>
         </profile>
 

Modified: incubator/tuscany/java/sca/tutorial/store-client/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-client/META-INF/sca-contribution.xml?rev=653108&r1=652985&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-client/META-INF/sca-contribution.xml (original)
+++ incubator/tuscany/java/sca/tutorial/store-client/META-INF/sca-contribution.xml Sat May  3 12:17:05 2008
@@ -19,9 +19,5 @@
 -->
 <contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
    xmlns:s="http://store">
-   <import.java package="services"/>
-   <import.java package="services.merger"/>
-   <import.java package="services.db"/>
-   <import.resource uri="uiservices/store.html"/>   
-   <deployable composite="s:store-supplier"/>
+   <deployable composite="s:store-client"/>
 </contribution>
\ No newline at end of file

Added: incubator/tuscany/java/sca/tutorial/store-client/client/Shopper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-client/client/Shopper.java?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-client/client/Shopper.java (added)
+++ incubator/tuscany/java/sca/tutorial/store-client/client/Shopper.java Sat May  3 12:17:05 2008
@@ -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 client;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Shopper {
+    
+    String shop(String itemName, int quantity);
+
+}

Propchange: incubator/tuscany/java/sca/tutorial/store-client/client/Shopper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store-client/client/Shopper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/tutorial/store-client/client/Shopper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/tuscany/java/sca/tutorial/store-client/client/ShopperImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-client/client/ShopperImpl.java?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-client/client/ShopperImpl.java (added)
+++ incubator/tuscany/java/sca/tutorial/store-client/client/ShopperImpl.java Sat May  3 12:17:05 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 client;
+
+import org.apache.tuscany.sca.implementation.data.collection.NotFoundException;
+import org.osoa.sca.annotations.Reference;
+
+import services.Cart;
+import services.Catalog;
+import services.Item;
+import services.Total;
+
+public class ShopperImpl implements Shopper {
+    
+    @Reference
+    public Catalog catalog;
+    
+    @Reference
+    public Cart shoppingCart;
+    
+    @Reference
+    public Total shoppingTotal;
+
+    public String shop(String itemName, int quantity) {
+        
+        Item[] items = catalog.get();
+        for (Item item: items) {
+            if (item.getName().startsWith(itemName)) {
+                
+                try {
+                    shoppingCart.delete("");
+                } catch (NotFoundException e) {
+                }
+
+                for (int i = 0; i < quantity; i++) {
+                    shoppingCart.post("item" + i, item);
+                }
+                
+                return shoppingTotal.getTotal();
+            }
+        }
+        
+        return "";
+    }
+
+}

Propchange: incubator/tuscany/java/sca/tutorial/store-client/client/ShopperImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store-client/client/ShopperImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/tutorial/store-client/client/ShopperImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/tuscany/java/sca/tutorial/store-client/launch/LaunchStoreClientNode.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-client/launch/LaunchStoreClientNode.java?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-client/launch/LaunchStoreClientNode.java (added)
+++ incubator/tuscany/java/sca/tutorial/store-client/launch/LaunchStoreClientNode.java Sat May  3 12:17:05 2008
@@ -0,0 +1,43 @@
+/*
+ * 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 launch;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.launcher.NodeLauncher;
+
+import client.Shopper;
+
+public class LaunchStoreClientNode {
+
+    public static void main(String[] args) throws Exception {
+        NodeLauncher nodeLauncher = NodeLauncher.newInstance();
+        SCANode2 storeClientNode = nodeLauncher.createNode("http://localhost:9990/node-config/StoreClientNode");
+        storeClientNode.start();
+        SCAClient client = (SCAClient)storeClientNode;
+        
+        Shopper shopper = client.getService(Shopper.class, "StoreClient");
+        
+        String total = shopper.shop("Orange", 5);
+        System.out.println("Total: " + total);
+        
+        storeClientNode.stop();
+    }
+}

Propchange: incubator/tuscany/java/sca/tutorial/store-client/launch/LaunchStoreClientNode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store-client/launch/LaunchStoreClientNode.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/tutorial/store-client/launch/LaunchStoreClientNode.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/tuscany/java/sca/tutorial/store-client/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-client/pom.xml?rev=653108&r1=652985&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-client/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/store-client/pom.xml Sat May  3 12:17:05 2008
@@ -25,8 +25,8 @@
         <version>2.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <artifactId>tutorial-store-supplier</artifactId>
-    <name>Apache Tuscany SCA Tutorial Supplier Online Store</name>
+    <artifactId>tutorial-store-client</artifactId>
+    <name>Apache Tuscany SCA Tutorial Online Store Client</name>
 
     <repositories>
        <repository>
@@ -41,6 +41,52 @@
             <artifactId>tuscany-sca-api</artifactId>
             <version>2.0-incubating-SNAPSHOT</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-data-api</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node2-launcher</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node2-api</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-node-runtime</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-atom-abdera</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
     </dependencies>
     
     <build>
@@ -71,40 +117,6 @@
                     </execution>
                 </executions>
             </plugin>
-
-	        <plugin>
-	             <groupId>org.codehaus.mojo</groupId>
-	             <artifactId>sql-maven-plugin</artifactId>
-	             <version>1.0</version>
-	
-	             <dependencies>
-	                 <dependency>
-	                     <groupId>org.apache.derby</groupId>
-	                     <artifactId>derby</artifactId>
-	                     <version>10.1.2.1</version>
-	                 </dependency>
-	             </dependencies>
-	
-	             <executions>
-	                 <execution>
-	                     <id>create-db</id>
-	                     <phase>generate-resources</phase>
-	                     <goals>
-	                         <goal>execute</goal>
-	                     </goals>
-	                     <configuration>
-	                         <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
-	                         <url>jdbc:derby:${basedir}/target/cart-db;create=true</url>
-	                         <autocommit>true</autocommit>
-	                         <onError>continue</onError>
-	                         <delimiter>;</delimiter>
-	                         <srcFiles>
-	                             <srcFile>${basedir}/../assets/services/db/cart.sql</srcFile>
-	                         </srcFiles>
-	                     </configuration>
-	                 </execution>
-	             </executions>
-	         </plugin>
        </plugins>
     </build>
 

Added: incubator/tuscany/java/sca/tutorial/store-client/services/Cart.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-client/services/Cart.java?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-client/services/Cart.java (added)
+++ incubator/tuscany/java/sca/tutorial/store-client/services/Cart.java Sat May  3 12:17:05 2008
@@ -0,0 +1,28 @@
+/*
+ * 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 services;
+
+import org.apache.tuscany.sca.implementation.data.collection.Collection;
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Cart extends Collection<String, Item> {
+
+}

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Cart.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Cart.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Cart.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/tuscany/java/sca/tutorial/store-client/services/Catalog.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-client/services/Catalog.java?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-client/services/Catalog.java (added)
+++ incubator/tuscany/java/sca/tutorial/store-client/services/Catalog.java Sat May  3 12:17:05 2008
@@ -0,0 +1,27 @@
+/*
+ * 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 services;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Catalog {
+    Item[] get();
+}

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Catalog.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Catalog.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Catalog.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/tuscany/java/sca/tutorial/store-client/services/Item.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-client/services/Item.java?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-client/services/Item.java (added)
+++ incubator/tuscany/java/sca/tutorial/store-client/services/Item.java Sat May  3 12:17:05 2008
@@ -0,0 +1,66 @@
+/*
+ * 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 services;
+
+
+public class Item {
+    private String name;
+    private String price;
+    private String origin;
+    
+    public Item() {
+    }
+    
+    public Item(String name, String price, String origin) {
+        this.name = name;
+        this.price = price;
+        this.origin = origin;
+    }
+    
+    public Item(String name, String price) {
+        this.name = name;
+        this.price = price;
+    }
+    
+    public String getName() {
+        return name;
+    }
+    
+    public void setName(String name) {
+        this.name = name;
+    }
+    
+    public String getPrice() {
+        return price;
+    }
+    
+    public void setPrice(String price) {
+        this.price = price;
+    }
+
+    public String getOrigin() {
+        return origin;
+    }
+
+    public void setOrigin(String origin) {
+        this.origin = origin;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Item.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Item.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Item.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/tuscany/java/sca/tutorial/store-client/services/Total.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-client/services/Total.java?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-client/services/Total.java (added)
+++ incubator/tuscany/java/sca/tutorial/store-client/services/Total.java Sat May  3 12:17:05 2008
@@ -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 services;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Total {
+    
+    String getTotal();
+
+}

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Total.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Total.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/tutorial/store-client/services/Total.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/tuscany/java/sca/tutorial/store-client/store-client.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-client/store-client.composite?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-client/store-client.composite (added)
+++ incubator/tuscany/java/sca/tutorial/store-client/store-client.composite Sat May  3 12:17:05 2008
@@ -0,0 +1,38 @@
+<?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.    
+-->
+<composite	xmlns="http://www.osoa.org/xmlns/sca/1.0"
+		xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
+		targetNamespace="http://store"
+		name="store-client">
+		
+    <component name="StoreClient">
+        <implementation.java class="client.ShopperImpl"/>
+		<reference name="catalog" target="StoreSupplierCatalog">
+		 	<binding.ws/>
+		 </reference>
+		 <reference name="shoppingCart" target="StoreSupplierShoppingCart/Cart">
+		 	<t:binding.atom/>
+		 </reference>
+		 <reference name="shoppingTotal" target="StoreSupplierShoppingCart/Total">
+		 	<binding.ws/>
+		 </reference>
+    </component>
+    
+</composite>

Propchange: incubator/tuscany/java/sca/tutorial/store-client/store-client.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store-client/store-client.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/tutorial/store-supplier/store-supplier.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-supplier/store-supplier.composite?rev=653108&r1=653107&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-supplier/store-supplier.composite (original)
+++ incubator/tuscany/java/sca/tutorial/store-supplier/store-supplier.composite Sat May  3 12:17:05 2008
@@ -66,6 +66,7 @@
 		</service>    	
 		<service name="Total">
 			<t:binding.jsonrpc/>
+			<binding.ws uri="/ShoppinCartTotalWebService"/>
 		</service>
 	</component>
     

Added: incubator/tuscany/java/sca/tutorial/store-test/client/Shopper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-test/client/Shopper.java?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-test/client/Shopper.java (added)
+++ incubator/tuscany/java/sca/tutorial/store-test/client/Shopper.java Sat May  3 12:17:05 2008
@@ -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 client;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Shopper {
+    
+    String shop(String itemName, int quantity);
+
+}

Propchange: incubator/tuscany/java/sca/tutorial/store-test/client/Shopper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store-test/client/Shopper.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/tutorial/store-test/client/Shopper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/tuscany/java/sca/tutorial/store-test/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-test/pom.xml?rev=653108&r1=652985&r2=653108&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-test/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/store-test/pom.xml Sat May  3 12:17:05 2008
@@ -25,8 +25,8 @@
         <version>2.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
-    <artifactId>tutorial-store-supplier</artifactId>
-    <name>Apache Tuscany SCA Tutorial Supplier Online Store</name>
+    <artifactId>tutorial-store-test</artifactId>
+    <name>Apache Tuscany SCA Tutorial Integration Test</name>
 
     <repositories>
        <repository>
@@ -41,11 +41,128 @@
             <artifactId>tuscany-sca-api</artifactId>
             <version>2.0-incubating-SNAPSHOT</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-data-api</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node2-launcher</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node2-api</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-domain-manager</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-node-runtime</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-widget</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-resource</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-atom-abdera</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-jsonrpc</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-http</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-sca-axis2</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ejb</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-ejb-xml</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
+            <version>10.1.2.1</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
+        </dependency>
+
     </dependencies>
     
     <build>
        <finalName>${artifactId}</finalName>
-       <sourceDirectory>${basedir}</sourceDirectory>
+       <testSourceDirectory>${basedir}</testSourceDirectory>
        <resources>
           <resource>
               <directory>${basedir}</directory>
@@ -94,7 +211,7 @@
 	                     </goals>
 	                     <configuration>
 	                         <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
-	                         <url>jdbc:derby:${basedir}/target/cart-db;create=true</url>
+	                         <url>jdbc:derby:${basedir}/../store-supplier/target/cart-db;create=true</url>
 	                         <autocommit>true</autocommit>
 	                         <onError>continue</onError>
 	                         <delimiter>;</delimiter>

Added: incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java?rev=653108&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java (added)
+++ incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java Sat May  3 12:17:05 2008
@@ -0,0 +1,86 @@
+/*
+ * 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 test;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.launcher.DomainManagerLauncher;
+import org.apache.tuscany.sca.node.launcher.NodeLauncher;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import client.Shopper;
+
+
+/**
+ * Test the store-merger.
+ *
+ * @version $Rev$ $Date$
+ */
+public class StoreSupplierTestCaseFIXME {
+    
+    private SCANode2 domainManager;
+    private SCANode2 storeSupplierNode;
+    private SCANode2 storeCatalogsNode;
+    private SCANode2 storeClientNode;
+
+    @Before
+    public void setup() throws Exception {
+        
+        DomainManagerLauncher managerLauncher = DomainManagerLauncher.newInstance();
+        domainManager = managerLauncher.createDomainManager("../domain");
+        domainManager.start();
+        
+        NodeLauncher nodeLauncher = NodeLauncher.newInstance();
+        storeSupplierNode = nodeLauncher.createNode("http://localhost:9990/node-config/StoreSupplierNode");
+        storeSupplierNode.start();
+        
+        storeCatalogsNode = nodeLauncher.createNode("http://localhost:9990/node-config/CatalogsNode");
+        storeCatalogsNode.start();
+        
+        storeClientNode = nodeLauncher.createNode("http://localhost:9990/node-config/StoreClientNode");
+        storeClientNode.start();
+        
+    }
+    
+    @After
+    public void tearDown() throws Exception {
+        storeSupplierNode.stop();
+        storeCatalogsNode.stop();
+        storeClientNode.stop();
+        domainManager.stop();
+    }
+    
+    @Test
+    public void testShop() {
+        SCAClient client = (SCAClient)storeClientNode;
+        Shopper shopper = client.getService(Shopper.class, "StoreClient");
+        
+        String total = shopper.shop("Orange", 5);
+        System.out.println("Total: " + total);
+        
+        Assert.assertEquals("$17.75", total);
+        
+    }
+    
+}

Propchange: incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message