
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
69 lines
2.4 KiB
HTML
69 lines
2.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<!--
|
|
* 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.
|
|
-->
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<title>Apache Tuscany Calculator Sample Application</title>
|
|
<link rel="stylesheet" href="../../css/samples.css" type="text/css">
|
|
</head>
|
|
<body>
|
|
<h1>Apache Tuscany Calculator Sample Application</h1>
|
|
|
|
<p>
|
|
This sample illustrates the use of SCA to wire components together inside a composite.
|
|
All connections between the components are local and are defined using Java interfaces.
|
|
</p>
|
|
|
|
<h2>Setup</h2>
|
|
<p>
|
|
Please install Apache Maven and build the library composites as described in the
|
|
<a href="../../readme.html#GettingStarted">Getting Started</a> section of the root readme.
|
|
</p>
|
|
|
|
<h2>Building</h2>
|
|
|
|
<p>To build the sample run:</p>
|
|
<pre class="command">
|
|
$ mvn package
|
|
</pre>
|
|
<p>
|
|
This will build and package the code that calls the calculator composite from a
|
|
command line client environment.
|
|
</p>
|
|
|
|
<h2>Running</h2>
|
|
<p>
|
|
To run the client, use the <code>launcher</code> command from the standalone distribution:
|
|
</p>
|
|
<pre class="command">
|
|
$ java -jar {tuscany.installDir}/bin/launcher.jar target/calc.jar {add|subtract|multiply|divide} {param} {param}
|
|
</pre>
|
|
|
|
<p>where <code>tuscany.installDir</code> is the path where you installed the standalone distribution.</p>
|
|
|
|
<p>
|
|
The sample when run will display to the standard output:
|
|
</p>
|
|
<pre class="command">
|
|
$ java -jar {tuscany.installDir}/bin/launcher.jar target/calc.jar add 2 5
|
|
result = 7.0
|
|
</pre>
|
|
</body>
|
|
</html>
|