From 04dcd09976ecc5aa2948993b9a9a2d90d239ee44 Mon Sep 17 00:00:00 2001 From: antelder Date: Thu, 28 Jul 2011 10:58:07 +0000 Subject: Delete old beta3 branch as its going to be recreated from the current trunk git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1151789 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/calculator/CalculatorService.java | 38 -------------- .../launcher/LaunchCalculatorContribution.java | 60 ---------------------- 2 files changed, 98 deletions(-) delete mode 100644 sca-java-2.x/branches/2.0-Beta3/samples/running-tuscany/jse/src/main/java/calculator/CalculatorService.java delete mode 100644 sca-java-2.x/branches/2.0-Beta3/samples/running-tuscany/jse/src/main/java/launcher/LaunchCalculatorContribution.java (limited to 'sca-java-2.x/branches/2.0-Beta3/samples/running-tuscany/jse/src/main') diff --git a/sca-java-2.x/branches/2.0-Beta3/samples/running-tuscany/jse/src/main/java/calculator/CalculatorService.java b/sca-java-2.x/branches/2.0-Beta3/samples/running-tuscany/jse/src/main/java/calculator/CalculatorService.java deleted file mode 100644 index 12d80ffd1c..0000000000 --- a/sca-java-2.x/branches/2.0-Beta3/samples/running-tuscany/jse/src/main/java/calculator/CalculatorService.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 calculator; - -import org.oasisopen.sca.annotation.Remotable; - - -/** - * The Calculator service interface. - */ -@Remotable -public interface CalculatorService { - - double add(double n1, double n2); - - double subtract(double n1, double n2); - - double multiply(double n1, double n2); - - double divide(double n1, double n2); - -} diff --git a/sca-java-2.x/branches/2.0-Beta3/samples/running-tuscany/jse/src/main/java/launcher/LaunchCalculatorContribution.java b/sca-java-2.x/branches/2.0-Beta3/samples/running-tuscany/jse/src/main/java/launcher/LaunchCalculatorContribution.java deleted file mode 100644 index 2b787fb6b8..0000000000 --- a/sca-java-2.x/branches/2.0-Beta3/samples/running-tuscany/jse/src/main/java/launcher/LaunchCalculatorContribution.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 launcher; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -import calculator.CalculatorService; - -/** - * This program shows how to create an embedded SCA runtime, load a contribution, - * start it and locate and invoke an SCA component from Java. - */ -public class LaunchCalculatorContribution { - - /* - * Use the Tuscany Node API to: - * - create a Node instance and load a contribution from the parent directory - * - start the node (which starts deployable composites) - * - get a local service proxy - * - make a service call using the proxy - * - stop the node - */ - public static void main(String[] args) throws Exception { - Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "../calculator-contribution.jar")); - - node.start(); - - CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent"); - - double result = calculator.add(3, 2); - - System.out.println("3 + 2 = " + result); - - if (result != 5.0){ - throw new RuntimeException("Expected 5.0 but result was " + result); - } - - node.stop(); - } - -} -- cgit v1.2.3