blob: f4a79dd14de20f09d87801516ffc57b08c0a1b2b [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
<!--
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>
<head>
<link rel="shortcut icon" href="http://aries.apache.org/images/favicon.ico"></link>
<link type="text/css" rel="stylesheet" href="http://aries.apache.org/resources/site.css"></link>
</script><script src="http://aries.apache.org/resources/menus.js" language="javascript" type="text/javascript"></script>
<meta name="keywords" content="..."/>
<meta name="description" content="..." />
<title>
Apache Aries - AriesTrader
</title>
</head>
<body onload="SetMenu()">
<table width="100%" cellpadding="0" cellspacing="0">
<tr width="100%">
<td id="cell-0-0" colspan="2">&nbsp;</td>
<td id="cell-0-1">&nbsp;</td>
<td id="cell-0-2" colspan="2">&nbsp;</td>
</tr>
<tr width="100%">
<td id="cell-1-0">&nbsp;</td>
<td id="cell-1-1">&nbsp;</td>
<td id="cell-1-2">
<div style="padding: 5px;">
<div id="banner">
<!-- Banner -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" class="topbardiv" nowrap="">
<a href="http://aries.apache.org/" title="Apache Aries"> <img border="0" src="http://aries.apache.org/images/Arieslogo_Horizontal.gif"> </a>
</td>
<td align="right" nowrap="">
<a href="http://www.apache.org/" title="The Apache Software Foundation"> <img border="0" src="http://aries.apache.org/images/apache_feather.png"> </a>
</td>
</tr>
</table>
<!-- Banner -->
</div>
</div>
<div id="top-menu">
<table border="0" cellpadding="1" cellspacing="0" width="100%">
<tr>
<td>
<div align="left">
<!-- Breadcrumbs -->
<!-- Breadcrumbs -->
</div>
</td>
<td>
<div align="right">
<!-- Quicklinks -->
<DIV style="padding: 5px 5px 0px 25px;">
<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
<INPUT maxlength="255" name="q" size="15" type="text" value></INPUT>
<INPUT name="btnG" type="submit" value="Search"></INPUT>
<INPUT name="domains" type="hidden" value="aries.apache.org"></INPUT>
<INPUT name="sitesearch" type="hidden" value="aries.apache.org"></INPUT>
</FORM>
</DIV>
<!-- Quicklinks -->
</div>
</td>
</tr>
</table>
</div>
</td>
<td id="cell-1-3">&nbsp;</td>
<td id="cell-1-4">&nbsp;</td>
</tr>
<tr width="100%">
<td id="cell-2-0" colspan="2">&nbsp;</td>
<td id="cell-2-1">
<table>
<tr height="100%" valign="top">
<td height="100%">
<div id="wrapper-menu-page-right">
<div id="wrapper-menu-page-top">
<div id="wrapper-menu-page-bottom">
<div id="menu-page">
<!-- NavigationBar -->
<style type="text/css">
/* The following code is added by mdx_elementid.py
It was originally lifted from http://subversion.apache.org/style/site.css */
/*
* Hide class="elementid-permalink", except when an enclosing heading
* has the :hover property.
*/
.headerlink, .elementid-permalink {
visibility: hidden;
}
h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
<div onclick="SwitchMenu('documentation')" id="documentationTitle" class="menutitle">Documentation</div>
<div id="documentation" class="menuitemgroup">
<div class="menuitem">
<a href="/documentation/integrators-guide.html">Integrators Guide</a>
</div>
<div class="menuitem">
<a href="/documentation/articles.html">Articles</a>
</div>
<div class="menuitem">
<a href="https://svn.apache.org/repos/asf/aries/slides/">Slides</a>
</div>
<div class="menuitem">
<a href="/documentation/tutorials.html">Tutorials</a>
</div>
<div class="menuitem">
<a href="/documentation/tools.html">Tools</a>
</div>
</div>
<div onclick="SwitchMenu('modules')" id="modulesTitle" class="menutitle">Modules</div>
<div id="modules" class="menuitemgroup">
<div class="menuitem">
<a href="/modules/samples.html">Samples</a>
</div>
<div class="menuitem">
<a href="/modules/async-svcs.html">Asynchronous Services</a>
</div>
<div class="menuitem">
<a href="/modules/blueprint.html">Blueprint</a>
</div>
<div class="menuitem">
<a href="/modules/blueprint-maven-plugin.html">Blueprint-maven-plugin</a>
</div>
<div class="menuitem">
<a href="/modules/blueprintannotation.html">Blueprint Annotations</a>
</div>
<div class="menuitem">
<a href="/modules/blueprintnoosgi.html">Blueprint No-OSGi</a>
</div>
<div class="menuitem">
<a href="/modules/blueprintweb.html">Blueprint Web</a>
</div>
<div class="menuitem">
<a href="/modules/containers.html">Containers</a>
</div>
<div class="menuitem">
<a href="/modules/esaanttask.html">ESA Ant Task </a>
</div>
<div class="menuitem">
<a href="/modules/ebamavenpluginproject.html">EBA Maven Plugin </a>
</div>
<div class="menuitem">
<a href="/modules/esamavenpluginproject.html">ESA Maven Plugin </a>
</div>
<div class="menuitem">
<a href="/modules/jmx.html">JMX</a>
</div>
<div class="menuitem">
<a href="/modules/jndiproject.html">JNDI</a>
</div>
<div class="menuitem">
<a href="/modules/jpaproject.html">JPA</a>
</div>
<div class="menuitem">
<a href="/modules/transactioncontrol.html">Transaction Control Service</a>
</div>
<div class="menuitem">
<a href="/modules/transactionsproject.html">Transactions</a>
</div>
<div class="menuitem">
<a href="/modules/rsa.html">Remote Service Admin (RSA)</a>
</div>
<div class="menuitem">
<a href="/modules/spi-fly.html">SPI Fly</a>
</div>
<div class="menuitem">
<a href="/modules/subsystems.html">Subsystems</a>
</div>
<div class="menuitem">
<a href="/modules/applications.html">Applications (obsolete)</a>
</div>
</div>
<div onclick="SwitchMenu('downloads')" id="downloadsTitle" class="menutitle">Downloads</div>
<div id="downloads" class="menuitemgroup">
<div class="menuitem">
<a href="/downloads/currentreleases.html">Current Releases</a>
</div>
<div class="menuitem">
<a href="/downloads/testresults.html">Compliance Tests</a>
</div>
<div class="menuitem">
<a href="/downloads/archived-releases.html">Archived Releases</a>
</div>
</div>
<div onclick="SwitchMenu('community')" id="communityTitle" class="menutitle">Community</div>
<div id="community" class="menuitemgroup">
<div class="menuitem">
<a href="/community/resources.html">Community Resources</a>
</div>
<div class="menuitem">
<a href="/community/gettinginvolved.html">Getting Involved</a>
</div>
<div class="menuitem">
<a href="/community/people.html">Who we are</a>
</div>
<div class="menuitem">
<a href="/community/boardreports.html">Board Reports</a>
</div>
<div class="menuitem">
<a href="/community/logos.html">Logos for Users</a>
</div>
</div>
<div onclick="SwitchMenu('development')" id="developmentTitle" class="menutitle">Development</div>
<div id="development" class="menuitemgroup">
<div class="menuitem">
<a href="/development/buildingaries.html">Building Aries </a>
</div>
<div class="menuitem">
<a href="/development/guidelines.html">Cording Guidelines</a>
</div>
<div class="menuitem">
<a href="/development/architecture.html">Architecture</a>
</div>
<div class="menuitem">
<a href="/development/releasingaries.html">Releasing Aries </a>
</div>
<div class="menuitem">
<a href="/development/compliancetesting.html">OSGi Compliance Tests </a>
</div>
<div class="menuitem">
<a href="/development/maintainingthewebpages.html">Web Site Maintenance </a>
</div>
</div>
<div onclick="SwitchMenu('sponsorship')" id="sponsorshipTitle" class="menutitle">Sponsorship</div>
<div id="sponsorship" class="menuitemgroup">
<div class="menuitem">
<a href="http://www.apache.org/foundation/thanks.html">Thanks</a>
</div>
<div class="menuitem">
<a href="http://www.apache.org/foundation/sponsorship.html">Sponsoring Apache</a>
</div>
</div>
<div class="promotion">
<a href="http://www.apache.org/events/current-event.html">
<img src="http://www.apache.org/events/current-event-125x125.png" width="125" height="125"/>
</a>
</div>
<!-- NavigationBar -->
</div>
</div>
</div>
</div>
</td>
<td height="100%" width="100%">
<!-- Content -->
<div class="wiki-content"><style type="text/css">
/* The following code is added by mdx_elementid.py
It was originally lifted from http://subversion.apache.org/style/site.css */
/*
* Hide class="elementid-permalink", except when an enclosing heading
* has the :hover property.
*/
.headerlink, .elementid-permalink {
visibility: hidden;
}
h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
<p><a name="AriesTrader-TheAriesTraderSample"></a></p>
<h1 id="the-ariestrader-sample">The AriesTrader Sample<a class="headerlink" href="#the-ariestrader-sample" title="Permanent link">&para;</a></h1>
<p><a name="AriesTrader-Prereqs"></a></p>
<h3 id="prereqs">Prereqs<a class="headerlink" href="#prereqs" title="Permanent link">&para;</a></h3>
<p><br></p>
<hr />
<p><strong>Note:</strong> </p>
<p>These instructions are for the 1.0.0 release of Aries.
Instructions for older releases can be found <a href="archiveinstructions.html">here</a>
. In the 0.2-incubating release the AriesTrader sample was changed such
that it is no longer required for you to install Derby independently. The
Derby version included in the sample is fully leveraged internally in the
sample and therefore no additional Derby installation is required.
However, there are steps required to initialize the Database from within
the sample itself (see instructions below). </p>
<hr />
<p><a name="AriesTrader-CreatingtheOSGiplatform(equinox-test-harness)forAriesTrader"></a></p>
<h3 id="creating-the-osgi-platform-equinox-test-harness-for-ariestrader">Creating the OSGi platform (equinox-test-harness) for AriesTrader<a class="headerlink" href="#creating-the-osgi-platform-equinox-test-harness-for-ariestrader" title="Permanent link">&para;</a></h3>
<p>Download and unzip the source zip for the <a href="aries:downloads.html">latest release</a>
of Aries Samples and build the equinox-test-harness module under
ariestrader:</p>
<div class="codehilite"><pre><span class="n">cd</span> <span class="n">samples</span><span class="o">-</span>1<span class="p">.</span>0<span class="p">.</span>0<span class="o">-</span><span class="n">incubating</span><span class="o">/</span><span class="n">ariestrader</span><span class="o">/</span><span class="n">assemblies</span><span class="o">/</span><span class="n">equinox</span><span class="o">-</span><span class="n">test</span><span class="o">-</span><span class="n">harness</span>
<span class="n">mvn</span> <span class="n">install</span>
</pre></div>
<p>This procedure will pull in the binaries from the latest release and its
dependencies.</p>
<p><a name="AriesTrader-AlternativebuildusingApacheAriestrunk."></a></p>
<h3 id="alternative-build-using-apache-aries-trunk">Alternative build using Apache Aries trunk.<a class="headerlink" href="#alternative-build-using-apache-aries-trunk" title="Permanent link">&para;</a></h3>
<p>As an alternative to using the released version you can also choose to work
with the latest, unreleased code. This will require the use of subversion
to checkout the code followed by building the entire Apache Aries project.
Directions are provided here: <a href="aries:buildingaries.html">Building Aries instructions</a>
.</p>
<p><a name="AriesTrader-StartingtheEquinoxTestHarnesstoruntheAriesTradersample"></a></p>
<h3 id="starting-the-equinox-test-harness-to-run-the-ariestrader-sample">Starting the Equinox Test Harness to run the AriesTrader sample<a class="headerlink" href="#starting-the-equinox-test-harness-to-run-the-ariestrader-sample" title="Permanent link">&para;</a></h3>
<p>AriesTrader needs a test harness to run in. For this purpose we are using
an Equinox assembly that pulls in all of the necessary dependencies. </p>
<p>The first task is to start the Apache Aries modules in an OSGi framework
using the Eclipse Equinox test harness</p>
<div class="codehilite"><pre><span class="n">cd</span> <span class="n">samples</span><span class="o">-</span>1<span class="p">.</span>0<span class="p">.</span>0<span class="o">-</span><span class="n">incubating</span><span class="o">/</span><span class="n">ariestrader</span><span class="o">/</span><span class="n">assemblies</span><span class="o">/</span><span class="n">equinox</span><span class="o">-</span><span class="n">test</span><span class="o">-</span><span class="n">harness</span><span class="o">/</span><span class="n">target</span>
<span class="n">java</span> <span class="o">-</span><span class="n">jar</span> <span class="n">osgi</span><span class="o">-</span>3<span class="p">.</span>5<span class="p">.</span>0<span class="p">.</span><span class="n">v20090520</span><span class="p">.</span><span class="n">jar</span> <span class="o">-</span><span class="n">console</span>
</pre></div>
<p>The OSGi console should start up, the 'ss' command should show the active
bundles but the AriesTrader application is not yet installed (with the
exception of the ariestrader derby datasource which is started with the
test harness for convenience). </p>
<p><a name="AriesTrader-InstallingAriesTraderintheEquinoxTestHarness"></a></p>
<h3 id="installing-ariestrader-in-the-equinox-test-harness">Installing AriesTrader in the Equinox Test Harness<a class="headerlink" href="#installing-ariestrader-in-the-equinox-test-harness" title="Permanent link">&para;</a></h3>
<p>To install the AriesTrader application simply copy the eba for AriesTrader
into the target/load directory, you will need to create this directory first.<br />
For convenience the AriesTraders EBAs are
copied into the target directory as part of creating the OSGi Equinox test
harness. </p>
<p>When using the "JDBC" only AriesTrader configuration which supports only
jdbc persistence:</p>
<div class="codehilite"><pre><span class="n">cp</span> <span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">aries</span><span class="p">.</span><span class="n">samples</span><span class="p">.</span><span class="n">ariestrader</span><span class="p">.</span><span class="n">jdbc</span><span class="o">-*</span><span class="p">.</span><span class="n">eba</span> <span class="n">load</span><span class="o">/</span>
</pre></div>
<p>When using the "All" AriesTrader configuration which supports all currently
available persistence modes:</p>
<div class="codehilite"><pre><span class="n">cp</span> <span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">aries</span><span class="p">.</span><span class="n">samples</span><span class="p">.</span><span class="n">ariestrader</span><span class="p">.</span><span class="n">all</span><span class="o">-*</span><span class="p">.</span><span class="n">eba</span> <span class="n">load</span><span class="o">/</span>
</pre></div>
<p>Now the 'ss' command should show all of the AriesTrader bundles in state
'ACTIVE'.</p>
<p>If you subsequently delete org.apache.aries.samples.ariestrader.jdbc-<em>.eba
or org.apache.aries.samples.ariestrader.all-</em>.eba from the target/load
directory the application will be uninstalled.</p>
<p><a name="AriesTrader-AccessingandusingtheAriesTradersample"></a></p>
<h3 id="accessing-and-using-the-ariestrader-sample">Accessing and using the AriesTrader sample<a class="headerlink" href="#accessing-and-using-the-ariestrader-sample" title="Permanent link">&para;</a></h3>
<p>Point your browser at <a href="http://localhost:8080/ariestrader/">http://localhost:8080/ariestrader/</a></p>
<p>Select the "Configuration" tab and the "Configure AriesTrader run-time
parameters" choice. Then select from among the available runtime modes
(defauls to JDBC). Be sure to click "update config" to save your
selection.</p>
<p>At the moment the following persistence modes are available when using the
"all" EBA:
<em> JDBC persistence
</em> JPA application managed entity manager persistence
* JPA container managed entity managers using declarative transaction
support </p>
<p>By default, the sample starts with JDBC persistence. To select another
persistence mechanism see the directions under "Accessing and using the
AriesTrader sample. </p>
<p>After selecting the persistence mode you must create the AriesTrader
Database tables and indexs. Select the "Configuration" tab and the
"(Re)-create AriesTrader Tables and Indexes". </p>
<p>Next, you must seed the database with test content. Once again go to the
"Configuration" tab but this time select "(Re)-populate AriesTrader
Database" from the available choices to seed the database with a default
set of users and stock quotes. You will see a number of quotes (default is
400) and users (default is 200) created.</p>
<p>Select the "Trading &amp; Portfolios" tab to use the mock trade application or
the "Primitives" tab to run some of the web primitive tests (PingJSPEL is
not currently working). You can also run the "Test AriesTrader Scenario"
from the "Configuration" tab which will launch a new browser window and
step through a trading scenario with each reload of the page.</p>
<p><a name="AriesTrader-AbouttheAriesTraderSample"></a></p>
<h3 id="about-the-ariestrader-sample">About the AriesTrader Sample<a class="headerlink" href="#about-the-ariestrader-sample" title="Permanent link">&para;</a></h3>
<p>The AriesTrader sample is a modified version of the Apache Geronimo
DayTrader sample. It has been somewhat simplified and reorganized to
support the Apache Aries programming model. </p>
<p>The AriesTrader sample bundles are organized like this:</p>
<p><img alt="at2" src="ariesTraderOverview2.png" /></p></div>
<!-- Content -->
</td>
</tr>
</table>
</td>
<td id="cell-2-2" colspan="2">&nbsp;</td>
</tr>
<tr width="100%">
<td id="cell-3-0">&nbsp;</td>
<td id="cell-3-1">&nbsp;</td>
<td id="cell-3-2">
<div id="footer">
<!-- Footer -->
<div id="site-footer">
<a href="http://aries.apache.org/privacy-policy.html";>Privacy
Policy</a>
</div>
<!-- Footer -->
</div>
</td>
<td id="cell-3-3">&nbsp;</td>
<td id="cell-3-4">&nbsp;</td>
</tr>
<tr width="100%">
<td id="cell-4-0" colspan="2">&nbsp;</td>
<td id="cell-4-1">&nbsp;</td>
<td id="cell-4-2" colspan="2">&nbsp;</td>
</tr>
</table>
</body>
</html>