You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/12/19 19:40:40 UTC

svn commit: r605660 - in /incubator/tuscany/java/sca/tutorial: assets/META-INF/ cloud/ cloud/META-INF/ cloud/launch/ store-db/ store-eu/ store-merger/ store-supplier/ store/ store/META-INF/ store/launch/

Author: jsdelfino
Date: Wed Dec 19 10:40:39 2007
New Revision: 605660

URL: http://svn.apache.org/viewvc?rev=605660&view=rev
Log:
Starting to use contributions in the tutorial.

Added:
    incubator/tuscany/java/sca/tutorial/assets/META-INF/
    incubator/tuscany/java/sca/tutorial/assets/META-INF/sca-contribution.xml   (with props)
    incubator/tuscany/java/sca/tutorial/cloud/META-INF/
    incubator/tuscany/java/sca/tutorial/cloud/META-INF/sca-contribution.xml   (with props)
    incubator/tuscany/java/sca/tutorial/store/META-INF/
    incubator/tuscany/java/sca/tutorial/store/META-INF/sca-contribution.xml   (with props)
Modified:
    incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java
    incubator/tuscany/java/sca/tutorial/cloud/pom.xml
    incubator/tuscany/java/sca/tutorial/store-db/pom.xml
    incubator/tuscany/java/sca/tutorial/store-eu/pom.xml
    incubator/tuscany/java/sca/tutorial/store-merger/pom.xml
    incubator/tuscany/java/sca/tutorial/store-supplier/pom.xml
    incubator/tuscany/java/sca/tutorial/store/launch/LaunchStore.java
    incubator/tuscany/java/sca/tutorial/store/pom.xml

Added: incubator/tuscany/java/sca/tutorial/assets/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/assets/META-INF/sca-contribution.xml?rev=605660&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/assets/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/java/sca/tutorial/assets/META-INF/sca-contribution.xml Wed Dec 19 10:40:39 2007
@@ -0,0 +1,22 @@
+<?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"
+	          targetNamespace="http://assets">
+</contribution>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/tutorial/assets/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/assets/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/tutorial/cloud/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/META-INF/sca-contribution.xml?rev=605660&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/java/sca/tutorial/cloud/META-INF/sca-contribution.xml Wed Dec 19 10:40:39 2007
@@ -0,0 +1,26 @@
+<?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"
+	          targetNamespace="http://cloud"
+              xmlns:c="http://cloud">
+   <deployable composite="c:catalogs"/>
+   <deployable composite="c:currency"/>
+   <import.java package="services"/>
+</contribution>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/tutorial/cloud/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java?rev=605660&r1=605659&r2=605660&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java (original)
+++ incubator/tuscany/java/sca/tutorial/cloud/launch/LaunchCloud.java Wed Dec 19 10:40:39 2007
@@ -19,6 +19,7 @@
 
 package launch;
 
+import java.io.File;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
@@ -27,7 +28,6 @@
 import org.apache.tuscany.sca.domain.SCADomainFactory;
 import org.apache.tuscany.sca.node.SCANode;
 import org.apache.tuscany.sca.node.SCANodeFactory;
-import org.apache.tuscany.sca.node.util.SCAContributionUtil;
 
 
 public class LaunchCloud {
@@ -39,19 +39,23 @@
         SCADomain domain = domainFactory.createSCADomain("http://localhost:9998");
         System.out.println("Domain controller ready for big business !!!");
         
+        
+        URL cloudContribution = new File(new File(".") + "/target/classes").toURL();
+        URL assetsContribution = new File(new File("../assets") + "/target/classes").toURL();
+        
         SCANode catalogsNode = nodeFactory.createSCANode("http://localhost:8200/cloud", "http://localhost:9998");
-        URL catalogsContribution = SCAContributionUtil.findContributionFromClass(LaunchCloud.class);
-        catalogsNode.addContribution("http://cloud", catalogsContribution);
+        catalogsNode.addContribution("http://cloud", cloudContribution);
+        catalogsNode.addContribution("http://assets", assetsContribution);
         catalogsNode.addToDomainLevelComposite(new QName("http://cloud", "catalogs"));
         // the ejb component simply provides the meta data required to locate the 
         // EJB running in Geronimo
-        catalogsNode.addToDomainLevelComposite(new QName("http://store", "catalog-jee"));
+//        catalogsNode.addToDomainLevelComposite(new QName("http://store", "catalog-jee"));
         catalogsNode.start();
         System.out.println("catalogs.composite ready for big business !!!");
         
         SCANode currencyNode = nodeFactory.createSCANode("http://localhost:8300/cloud", "http://localhost:9998");
-        URL currencyContribution = SCAContributionUtil.findContributionFromClass(LaunchCloud.class);
-        currencyNode.addContribution("http://cloud", currencyContribution);
+        currencyNode.addContribution("http://cloud", cloudContribution);
+        catalogsNode.addContribution("http://assets", assetsContribution);
         currencyNode.addToDomainLevelComposite(new QName("http://cloud", "currency"));
         currencyNode.start();
         System.out.println("currency.composite ready for big business !!!");    

Modified: incubator/tuscany/java/sca/tutorial/cloud/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/cloud/pom.xml?rev=605660&r1=605659&r2=605660&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/cloud/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/cloud/pom.xml Wed Dec 19 10:40:39 2007
@@ -45,12 +45,6 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tutorial-assets</artifactId>
-            <version>1.1-incubating-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-node-api</artifactId>
             <version>1.1-incubating-SNAPSHOT</version>
         </dependency>
@@ -77,25 +71,11 @@
         
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-implementation-ejb-xml</artifactId>
-            <version>1.1-incubating-SNAPSHOT</version>
-            <scope>runtime</scope>
-        </dependency>        
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-binding-sca-axis2</artifactId>
             <version>1.1-incubating-SNAPSHOT</version>
             <scope>runtime</scope>
         </dependency>
         
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-binding-ejb</artifactId>
-            <version>1.1-incubating-SNAPSHOT</version>
-            <scope>runtime</scope>
-        </dependency>         
-
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>

Modified: incubator/tuscany/java/sca/tutorial/store-db/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-db/pom.xml?rev=605660&r1=605659&r2=605660&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-db/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/store-db/pom.xml Wed Dec 19 10:40:39 2007
@@ -45,12 +45,6 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tutorial-assets</artifactId>
-            <version>1.1-incubating-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-node-api</artifactId>
             <version>1.1-incubating-SNAPSHOT</version>
         </dependency>

Modified: incubator/tuscany/java/sca/tutorial/store-eu/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-eu/pom.xml?rev=605660&r1=605659&r2=605660&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-eu/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/store-eu/pom.xml Wed Dec 19 10:40:39 2007
@@ -45,12 +45,6 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tutorial-assets</artifactId>
-            <version>1.1-incubating-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-node-api</artifactId>
             <version>1.1-incubating-SNAPSHOT</version>
         </dependency>

Modified: incubator/tuscany/java/sca/tutorial/store-merger/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-merger/pom.xml?rev=605660&r1=605659&r2=605660&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-merger/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/store-merger/pom.xml Wed Dec 19 10:40:39 2007
@@ -45,12 +45,6 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tutorial-assets</artifactId>
-            <version>1.1-incubating-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-node-api</artifactId>
             <version>1.1-incubating-SNAPSHOT</version>
         </dependency>

Modified: incubator/tuscany/java/sca/tutorial/store-supplier/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-supplier/pom.xml?rev=605660&r1=605659&r2=605660&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-supplier/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/store-supplier/pom.xml Wed Dec 19 10:40:39 2007
@@ -45,12 +45,6 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tutorial-assets</artifactId>
-            <version>1.1-incubating-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-node-api</artifactId>
             <version>1.1-incubating-SNAPSHOT</version>
         </dependency>

Added: incubator/tuscany/java/sca/tutorial/store/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store/META-INF/sca-contribution.xml?rev=605660&view=auto
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store/META-INF/sca-contribution.xml (added)
+++ incubator/tuscany/java/sca/tutorial/store/META-INF/sca-contribution.xml Wed Dec 19 10:40:39 2007
@@ -0,0 +1,25 @@
+<?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"
+	          targetNamespace="http://store"
+              xmlns:s="http://store">
+   <deployable composite="s:store"/>
+   <import.java package="services"/>
+</contribution>
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/tutorial/store/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/tutorial/store/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/tutorial/store/launch/LaunchStore.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store/launch/LaunchStore.java?rev=605660&r1=605659&r2=605660&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store/launch/LaunchStore.java (original)
+++ incubator/tuscany/java/sca/tutorial/store/launch/LaunchStore.java Wed Dec 19 10:40:39 2007
@@ -19,6 +19,7 @@
 
 package launch;
 
+import java.io.File;
 import java.net.URL;
 
 import javax.xml.namespace.QName;
@@ -30,11 +31,15 @@
 public class LaunchStore {
     public static void main(String[] args) throws Exception {
         System.out.println("Starting ...");
+        
+        URL storeContribution = new URL(new File(".").getAbsolutePath() + "/target/classes");
+        URL assetsContribution = new URL(new File("../assets").getAbsolutePath() + "/target/classes");
+        
         SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
         SCANode node = nodeFactory.createSCANode(null, "http://localhost:9998");
         
-        URL contribution = SCAContributionUtil.findContributionFromClass(LaunchStore.class);
-        node.addContribution("http://store", contribution);
+        node.addContribution("http://store", storeContribution);
+        node.addContribution("http://assets", assetsContribution);
         
         node.addToDomainLevelComposite(new QName("http://store", "store"));
         node.start();

Modified: incubator/tuscany/java/sca/tutorial/store/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store/pom.xml?rev=605660&r1=605659&r2=605660&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/store/pom.xml Wed Dec 19 10:40:39 2007
@@ -45,12 +45,6 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tutorial-assets</artifactId>
-            <version>1.1-incubating-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-node-api</artifactId>
             <version>1.1-incubating-SNAPSHOT</version>
         </dependency>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org