From 0d45e3ed781fd306d0ee24995648a74666d1bec6 Mon Sep 17 00:00:00 2001 From: slaws Date: Tue, 19 Aug 2008 16:26:34 +0000 Subject: TUSCANY-2550 - Adding more bindings to the spring bigbank sample. Convert the sample from SCADomain to Node APIs. Thanks for the patch Ram git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@687088 13f79535-47bb-0310-9956-ffa450edef68 --- java/sca/samples/spring-bigbank-stockquote/pom.xml | 179 +++++++++++---------- .../stockquote/server/StockQuoteServer.java | 87 +++++----- 2 files changed, 138 insertions(+), 128 deletions(-) (limited to 'java/sca/samples/spring-bigbank-stockquote') diff --git a/java/sca/samples/spring-bigbank-stockquote/pom.xml b/java/sca/samples/spring-bigbank-stockquote/pom.xml index 5755bb3e80..64d74a947c 100644 --- a/java/sca/samples/spring-bigbank-stockquote/pom.xml +++ b/java/sca/samples/spring-bigbank-stockquote/pom.xml @@ -1,86 +1,93 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-spring-bigbank-stockquote - Apache Tuscany SCA Spring-Based BigBank StockQuote Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-implementation-spring - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-ws-axis2 - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.4-SNAPSHOT + ../../pom.xml + + sample-spring-bigbank-stockquote + Apache Tuscany SCA Spring-Based BigBank StockQuote Sample + + + + apache.incubator + http://people.apache.org/repo/m2-incubating-repository + + + + + + org.apache.tuscany.sca + tuscany-node2-api + 1.4-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-node2-impl + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-spring + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-tomcat + 1.4-SNAPSHOT + runtime + + + + junit + junit + 4.2 + test + + + + + + ${artifactId} + + + diff --git a/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java b/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java index 26a3ec8883..97ba202b49 100644 --- a/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java +++ b/java/sca/samples/spring-bigbank-stockquote/src/main/java/bigbank/stockquote/server/StockQuoteServer.java @@ -1,42 +1,45 @@ -/* - * 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 bigbank.stockquote.server; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -/** - * This server program shows how to bootstrap SCA from a simple J2SE program - * and start it which activates the StockQuote Web service endpoint. - */ -public class StockQuoteServer { - - public static void main(String[] args) throws Exception { - - System.out.println("Starting the Sample SCA StockQuote Service..."); - - SCADomain domain = SCADomain.newInstance("StockQuote.composite"); - - System.out.println("Press Enter to Exit..."); - System.in.read(); - - domain.close(); - System.out.println("Bye"); - } - -} +/* + * 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 bigbank.stockquote.server; + +import org.apache.tuscany.sca.node.SCANode2; +import org.apache.tuscany.sca.node.SCANode2Factory; + +/** + * This server program shows how to bootstrap SCA from a simple J2SE program + * and start it which activates the StockQuote Web service endpoint. + */ +public class StockQuoteServer { + + public static void main(String[] args) throws Exception { + + System.out.println("Starting the Sample SCA StockQuote Service..."); + + SCANode2Factory factory = SCANode2Factory.newInstance(); + SCANode2 node = factory.createSCANodeFromClassLoader("StockQuote.composite", StockQuoteServer.class.getClassLoader()); + node.start(); + + System.out.println("Press Enter to Exit..."); + System.in.read(); + + node.stop(); + System.out.println("Bye"); + } + +} -- cgit v1.2.3