Author: jsdelfino
Date: Wed Jan 9 17:30:23 2008
New Revision: 610633
URL: http://svn.apache.org/viewvc?rev=610633&view=rev
Log:
Adding sca-contribution.xml, updating Launch class to the latest API, fixing
URIs in composite.
Added:
incubator/tuscany/java/sca/tutorial/store-supplier/META-INF/
incubator/tuscany/java/sca/tutorial/store-supplier/META-INF/sca-contribution.xml
(with props)
Modified:
incubator/tuscany/java/sca/tutorial/store-supplier/launch/LaunchStoreSupplier.java
incubator/tuscany/java/sca/tutorial/store-supplier/store-supplier.composite
Added:
incubator/tuscany/java/sca/tutorial/store-supplier/META-INF/sca-contribution.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-supplier/META-INF/sca-contribution.xml?rev=610633&view=auto
==============================================================================
---
incubator/tuscany/java/sca/tutorial/store-supplier/META-INF/sca-contribution.xml
(added)
+++
incubator/tuscany/java/sca/tutorial/store-supplier/META-INF/sca-contribution.xml
Wed Jan 9 17:30:23 2008
@@ -0,0 +1,27 @@
+<?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-db"/>
+ <import.java package="services"/>
+ <import.java package="services.merger"/>
+ <import.java package="services.db"/>
+</contribution>
\ No newline at end of file
Propchange:
incubator/tuscany/java/sca/tutorial/store-supplier/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/tuscany/java/sca/tutorial/store-supplier/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
incubator/tuscany/java/sca/tutorial/store-supplier/launch/LaunchStoreSupplier.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-supplier/launch/LaunchStoreSupplier.java?rev=610633&r1=610632&r2=610633&view=diff
==============================================================================
---
incubator/tuscany/java/sca/tutorial/store-supplier/launch/LaunchStoreSupplier.java
(original)
+++
incubator/tuscany/java/sca/tutorial/store-supplier/launch/LaunchStoreSupplier.java
Wed Jan 9 17:30:23 2008
@@ -19,31 +19,42 @@
package launch;
+import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;
-import org.apache.tuscany.sca.node.util.SCAContributionUtil;
public class LaunchStoreSupplier {
public static void main(String[] args) throws Exception {
System.out.println("Starting ...");
+
+ URL storeSupplierContribution = new File("./target/classes").toURL();
+ URL assetsContribution = new File("../assets/target/classes").toURL();
+ URL derbyContribution = new File(System.getProperty("user.home") +
"/.m2/repository/org/apache/derby/derby/10.1.2.1/derby-10.1.2.1.jar").toURL();
+ URL dataAPIContribution = new File(System.getProperty("user.home") +
"/.m2/repository/org/apache/tuscany/sca/tuscany-implementation-data-api/1.2-incubating-SNAPSHOT/tuscany-implementation-data-api-1.2-incubating-SNAPSHOT.jar").toURL();
+
SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
SCANode node = nodeFactory.createSCANode(null,
"http://localhost:9998");
- URL contribution =
SCAContributionUtil.findContributionFromClass(LaunchStoreSupplier.class);
- node.addContribution("http://store", contribution);
+ node.addContribution("http://org/apache/derby", derbyContribution);
+
node.addContribution("http://org/apache/tuscany/sca/implementation-data-api",
dataAPIContribution);
+ node.addContribution("http://assets", assetsContribution);
+ node.addContribution("http://store-supplier",
storeSupplierContribution);
node.addToDomainLevelComposite(new QName("http://store",
"store-supplier"));
- node.start();
+ //FIXME looks like we can't start/stop individual nodes anymore
+ node.getDomain().start();
System.out.println("store-supplier.composite ready for big business
!!!");
System.in.read();
System.out.println("Stopping ...");
- node.stop();
+ //FIXME looks like we can't start/stop individual nodes anymore
+ node.getDomain().stop();
+ //node.stop();
node.destroy();
System.out.println();
}
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=610633&r1=610632&r2=610633&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-supplier/store-supplier.composite
(original)
+++ incubator/tuscany/java/sca/tutorial/store-supplier/store-supplier.composite
Wed Jan 9 17:30:23 2008
@@ -42,7 +42,7 @@
<implementation.java
class="services.merger.MergedCatalogImpl"/>
<property name="currencyCode">USD</property>
<service name="Catalog">
- <t:binding.jsonrpc/>
+ <t:binding.jsonrpc uri="http://localhost:8103/Catalog"/>
<binding.ws
uri="http://localhost:8103/CatalogWebService"/>
</service>
<reference name="fruitsCatalog" target="FruitsCatalog"/>
@@ -60,10 +60,10 @@
<implementation.java class="services.db.ShoppingCartTableImpl"/>
<property name="database">cart-db</property>
<service name="Cart">
- <t:binding.atom/>
+ <t:binding.atom
uri="http://localhost:8103/ShoppingCart/Cart"/>
</service>
<service name="Total">
- <t:binding.jsonrpc/>
+ <t:binding.jsonrpc
uri="http://localhost:8103/ShoppingCart/Total"/>
</service>
</component>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]