diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-17 06:21:41 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-17 06:21:41 +0000 |
commit | c40ade3c51fffbe23ca390599c056206e0f5fd5b (patch) | |
tree | 77b6c512c7fb207fe5d9b81b9d3ddef5ab57da15 /java | |
parent | b33133d72fd46a719b9449d2582c1cd6f95f35c7 (diff) |
Updating store sample application to the latest OASIS namespace/packages and updating the launcher to use 2.x Node
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@881166 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
10 files changed, 45 insertions, 43 deletions
diff --git a/java/sca/samples/store/pom.xml b/java/sca/samples/store/pom.xml index baa666dabd..5e54efd09b 100644 --- a/java/sca/samples/store/pom.xml +++ b/java/sca/samples/store/pom.xml @@ -22,7 +22,7 @@ <parent> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-sca</artifactId> - <version>1.6-SNAPSHOT</version> + <version>2.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <artifactId>sample-store</artifactId> @@ -38,70 +38,69 @@ <dependencies> <dependency> <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.6-SNAPSHOT</version> + <artifactId>tuscany-node-impl</artifactId> + <version>2.0-SNAPSHOT</version> </dependency> - + <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-data-api</artifactId> - <version>1.6-SNAPSHOT</version> + <version>2.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-implementation-java-runtime</artifactId> - <version>1.6-SNAPSHOT</version> + <version>2.0-SNAPSHOT</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-implementation-widget-runtime-tuscany</artifactId> - <version>1.6-SNAPSHOT</version> + <artifactId>tuscany-implementation-widget-runtime-dojo</artifactId> + <version>2.0-SNAPSHOT</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-atom-abdera</artifactId> - <version>1.6-SNAPSHOT</version> + <artifactId>tuscany-binding-atom-runtime</artifactId> + <version>2.0-SNAPSHOT</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-atom-js</artifactId> - <version>1.6-SNAPSHOT</version> + <artifactId>tuscany-binding-atom-js-dojo</artifactId> + <version>2.0-SNAPSHOT</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-binding-jsonrpc-runtime</artifactId> - <version>1.6-SNAPSHOT</version> + <version>2.0-SNAPSHOT</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-binding-jsonrpc-js</artifactId> - <version>1.6-SNAPSHOT</version> + <artifactId>tuscany-binding-jsonrpc-js-dojo</artifactId> + <version>2.0-SNAPSHOT</version> <scope>runtime</scope> </dependency> - <dependency> <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-binding-http-runtime</artifactId> - <version>1.6-SNAPSHOT</version> + <version>2.0-SNAPSHOT</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-tomcat</artifactId> - <version>1.6-SNAPSHOT</version> + <artifactId>tuscany-host-jetty</artifactId> + <version>2.0-SNAPSHOT</version> <scope>runtime</scope> </dependency> @@ -111,7 +110,6 @@ <version>4.5</version> <scope>test</scope> </dependency> - </dependencies> <build> diff --git a/java/sca/samples/store/src/main/java/launch/Launch.java b/java/sca/samples/store/src/main/java/launch/Launch.java index 801697abea..5105b0ac43 100644 --- a/java/sca/samples/store/src/main/java/launch/Launch.java +++ b/java/sca/samples/store/src/main/java/launch/Launch.java @@ -19,16 +19,21 @@ package launch; -import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.node.Contribution; +import org.apache.tuscany.sca.node.ContributionLocationHelper; +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFactory; public class Launch { public static void main(String[] args) throws Exception { System.out.println("Starting ..."); - SCADomain scaDomain = SCADomain.newInstance("store.composite"); + String contribution = ContributionLocationHelper.getContributionLocation(Launch.class); + Node node = NodeFactory.newInstance().createNode("store.composite", new Contribution("test", contribution)); System.out.println("store.composite ready for big business !!!"); System.in.read(); System.out.println("Stopping ..."); - scaDomain.close(); + node.stop(); + node.destroy(); System.out.println(); } } diff --git a/java/sca/samples/store/src/main/java/services/Cart.java b/java/sca/samples/store/src/main/java/services/Cart.java index 9e6226d963..3fb5439bc3 100644 --- a/java/sca/samples/store/src/main/java/services/Cart.java +++ b/java/sca/samples/store/src/main/java/services/Cart.java @@ -20,7 +20,7 @@ package services; import org.apache.tuscany.sca.data.collection.Collection; -import org.osoa.sca.annotations.Remotable; +import org.oasisopen.sca.annotation.Remotable; @Remotable public interface Cart extends Collection<String, Item> { diff --git a/java/sca/samples/store/src/main/java/services/Catalog.java b/java/sca/samples/store/src/main/java/services/Catalog.java index 2c3b19f579..b5e504fe11 100644 --- a/java/sca/samples/store/src/main/java/services/Catalog.java +++ b/java/sca/samples/store/src/main/java/services/Catalog.java @@ -19,7 +19,7 @@ package services; -import org.osoa.sca.annotations.Remotable; +import org.oasisopen.sca.annotation.Remotable; @Remotable public interface Catalog { diff --git a/java/sca/samples/store/src/main/java/services/CurrencyConverter.java b/java/sca/samples/store/src/main/java/services/CurrencyConverter.java index e104a0423a..a064f3dd69 100644 --- a/java/sca/samples/store/src/main/java/services/CurrencyConverter.java +++ b/java/sca/samples/store/src/main/java/services/CurrencyConverter.java @@ -19,7 +19,7 @@ package services; -import org.osoa.sca.annotations.Remotable; +import org.oasisopen.sca.annotation.Remotable; @Remotable public interface CurrencyConverter { diff --git a/java/sca/samples/store/src/main/java/services/FruitsCatalogImpl.java b/java/sca/samples/store/src/main/java/services/FruitsCatalogImpl.java index 377b3d7e59..d132a24b00 100644 --- a/java/sca/samples/store/src/main/java/services/FruitsCatalogImpl.java +++ b/java/sca/samples/store/src/main/java/services/FruitsCatalogImpl.java @@ -22,9 +22,9 @@ package services; import java.util.ArrayList; import java.util.List; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; +import org.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Property; +import org.oasisopen.sca.annotation.Reference; public class FruitsCatalogImpl implements Catalog { diff --git a/java/sca/samples/store/src/main/java/services/Item.java b/java/sca/samples/store/src/main/java/services/Item.java index 27abd4f016..fe32cfc828 100644 --- a/java/sca/samples/store/src/main/java/services/Item.java +++ b/java/sca/samples/store/src/main/java/services/Item.java @@ -19,7 +19,6 @@ package services; - public class Item { private String name; private String price; diff --git a/java/sca/samples/store/src/main/java/services/ShoppingCartImpl.java b/java/sca/samples/store/src/main/java/services/ShoppingCartImpl.java index 9889921a96..698614212d 100644 --- a/java/sca/samples/store/src/main/java/services/ShoppingCartImpl.java +++ b/java/sca/samples/store/src/main/java/services/ShoppingCartImpl.java @@ -27,8 +27,8 @@ import java.util.UUID; import org.apache.tuscany.sca.data.collection.Entry; import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; +import org.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Scope; @Scope("COMPOSITE") public class ShoppingCartImpl implements Cart, Total { diff --git a/java/sca/samples/store/src/main/java/services/Total.java b/java/sca/samples/store/src/main/java/services/Total.java index 8f464e526f..b77cc1c7ac 100644 --- a/java/sca/samples/store/src/main/java/services/Total.java +++ b/java/sca/samples/store/src/main/java/services/Total.java @@ -19,7 +19,7 @@ package services; -import org.osoa.sca.annotations.Remotable; +import org.oasisopen.sca.annotation.Remotable; @Remotable public interface Total { diff --git a/java/sca/samples/store/src/main/resources/store.composite b/java/sca/samples/store/src/main/resources/store.composite index 571678839d..89ac474db1 100644 --- a/java/sca/samples/store/src/main/resources/store.composite +++ b/java/sca/samples/store/src/main/resources/store.composite @@ -17,24 +17,24 @@ * 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" +<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903" + xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" targetNamespace="http://store" name="store"> <component name="Store"> - <t:implementation.widget location="uiservices/store.html"/> + <tuscany:implementation.widget location="uiservices/store.html"/> <service name="Widget"> - <t:binding.http uri="/store"/> + <tuscany:binding.http uri="/store"/> </service> <reference name="catalog" target="Catalog"> - <t:binding.jsonrpc/> + <tuscany:binding.jsonrpc/> </reference> <reference name="shoppingCart" target="ShoppingCart/Cart"> - <t:binding.atom/> + <tuscany:binding.atom/> </reference> <reference name="shoppingTotal" target="ShoppingCart/Total"> - <t:binding.jsonrpc/> + <tuscany:binding.jsonrpc/> </reference> </component> @@ -42,7 +42,7 @@ <implementation.java class="services.FruitsCatalogImpl"/> <property name="currencyCode">USD</property> <service name="Catalog"> - <t:binding.jsonrpc/> + <tuscany:binding.jsonrpc/> </service> <reference name="currencyConverter" target="CurrencyConverter"/> </component> @@ -50,10 +50,10 @@ <component name="ShoppingCart"> <implementation.java class="services.ShoppingCartImpl"/> <service name="Cart"> - <t:binding.atom uri="/ShoppingCart/Cart"/> + <tuscany:binding.atom uri="/ShoppingCart/Cart"/> </service> <service name="Total"> - <t:binding.jsonrpc/> + <tuscany:binding.jsonrpc/> </service> </component> |