summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/sca-java-integration/samples/sca/bigbank/readme.html
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-1.x/branches/sca-java-integration/samples/sca/bigbank/readme.html')
-rw-r--r--sca-java-1.x/branches/sca-java-integration/samples/sca/bigbank/readme.html894
1 files changed, 894 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-java-integration/samples/sca/bigbank/readme.html b/sca-java-1.x/branches/sca-java-integration/samples/sca/bigbank/readme.html
new file mode 100644
index 0000000000..b5e90bb08f
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-integration/samples/sca/bigbank/readme.html
@@ -0,0 +1,894 @@
+<!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>
+<head>
+<script type="text/javascript">
+function expandImage(img,height,width) {
+window.open(img,"Image","menubar=no,resizable=no,status=no,toolbar=no,location=no,height=" + height + ",width=" + width);
+}
+function goURL(url) {
+window.location = url;
+}
+</script>
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=us-ascii">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+
+ <title>Tuscany BigBank Sample Application</title>
+ <link rel="stylesheet" href="../../css/base.css" type="text/css">
+<style type="text/css" media="all">
+</style>
+</head>
+
+<body>
+
+ <h3>Tuscany BigBank Sample Application</h3>
+
+ <h4>Overview</h4>
+
+ <p>The Tuscany BigBank&nbsp;sample application&nbsp; shows using
+ the Tuscany SCA runtime to build a&nbsp; financial application.
+ There are two modules: webclient provides the front-end user
+ interface and account provides the back-end business services.
+ These are deployed as separate web applications</p>
+
+ <h4>Location</h4>
+ <p>This sample is located&nbsp;in the&nbsp;
+ <a href=".">samples\applications\bigbank</a> directory. There are two
+ subdirectories in that for the two modules <a href="account"
+ target="_blank">account</a> and <a href="webclient" target=
+ "_blank">webclient.</a></p>
+
+
+ <h4>Prerequisites</h4>
+
+ <p>Obtain the following prerequisites and install according to
+ their documentation.</p>
+
+ <ul>
+ <li><a href="http://java.sun.com/javase/downloads/index.jsp"
+ target="_blank">JDK 5.0</a></li>
+
+ <li><a href="http://maven.apache.org/download.html" target=
+ "_blank">Maven 2.0.4</a></li>
+
+ <li><a href="http://tomcat.apache.org/download-55.cgi" target=
+ "_blank">Apache Tomcat 5.xx</a> latest version binary core
+ distribution.&nbsp;</li>
+ </ul>
+
+ <h4><a name="Building" id="Building"></a>Building</h4>
+ <p>This sample
+ can be built from the bigbank directory using Maven 2.0.4 with
+ the following command:</p>
+ <p>
+ <code>&nbsp;mvn<br></code>
+ </p>
+
+ <h4>Setup</h4>
+ <p>If you have enabled remote deployment in Tomcat by
+ adding the line:<br>
+ <code>&nbsp; &lt;user username="admin" password=""
+ roles="manager"/&gt;</code><br>
+ into&nbsp; <span style="font-style: italic;">&lt;tomcat
+ dir&gt;</span>\conf\tomcat-users.xml&nbsp; you can deploy the
+ WARs to Tomcat using the tomcat-maven-plugin:<br>
+ <code>mvn tomcat:deploy</code></p>
+ <p>Alternatively you can copy the WAR files to Tomcat's&nbsp;
+ webapps directory.<br>
+
+ <code>copy account\target\sample-bigbank-account.war <span style=
+ "font-style: italic;">&lt;tomcat dir&gt;</span>\webapps</code><br>
+ <code>copy&nbsp;
+ webclient\target\sample-bigbank-webclient.war&nbsp;<span style=
+ "font-style: italic;">&lt;tomcat dir&gt;</span>\webapps</code><br>
+ </p>
+
+ <h4>Running</h4>
+ <p>Once you've started your web server, use your web
+ browser to view the following URL <a href=
+ "http://localhost:8080/sample-bigbank-webclient/" target=
+ "_blank">http://localhost:8080/sample-bigbank-webclient/</a><br>
+ You can either use an already pre configured&nbsp; account with
+ <span style="font-weight: bold;">Login</span> as <span style=
+ "color: rgb(204, 0, 0); font-weight: bold;">test</span> and
+ <span style="font-weight: bold;">Password</span> as <span style=
+ "color: rgb(204, 0, 0); font-weight: bold;">password,</span> or
+ you can &nbsp;create a new account.<br>
+ The demo is first configured to use a local mock stock quote
+ service that returns random stock data. &nbsp;If you want to use
+ an actual stock quote provider follow these steps:</p>
+
+ <ul>
+ <li>Stop your server by issuing in the&nbsp; <span style=
+ "font-style: italic;">&lt;tomcat dir&gt;</span><span style=
+ "font-weight: bold;">\bin</span> directory</li>
+
+ <li>Issue <span style="font-weight: bold;">shutdown</span>
+ command to stop your web application server<span style=
+ "font-weight: bold;">.</span></li>
+
+ <li>Edit the account SCDL file <span style=
+ "font-style: italic;">&lt;tomcat dir&gt;</span><span style=
+ "font-weight: bold;">\webapps\sample-bigbank-account\WEB-INF\default.scdl</span></li>
+
+ <li>Change the SCDL wiring to remove the mock stock quote
+ service by commenting it out as follows:<br>
+ &lt;!--<br>
+ &nbsp;&nbsp;&nbsp; &lt;component
+ name="StockQuoteServiceComponent"&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;implementation.java
+ class="bigbank.account.services.stockquote.StockQuoteServiceImpl"
+ /&gt;<br>
+ &nbsp;&nbsp;&nbsp; &lt;/component&gt;<br>
+ --&gt;</li>
+
+ <li>Uncomment the real stockquote service section in lines 68
+ to 80.<br></li>
+
+ <li>Change to the directory &nbsp;<span style=
+ "font-weight: bold;">apache-tomcat-5.5.17\bin&nbsp;</span></li>
+
+ <li>issue <span style="font-weight: bold;">startup
+ &nbsp;</span> command to start up the server in the
+ <span style="font-style: italic;">&lt;tomcat dir&gt;</span>\bin
+ directory<span style="font-weight: bold;">.</span></li>
+ </ul>
+ <p>The sample should now be using the real stock quote
+ provider.&nbsp;</p>
+
+ <h4>Summary</h4><p>This example illustrates using Tuscany runtime
+ in building a financial Web application&nbsp;using SCA programing
+ model. &nbsp;The following key concepts are covered:</p>
+
+ <ul>
+ <li><b><i>Component implementations</i></b>. that provide web
+ based&nbsp; HTML&nbsp;user interface</li>
+
+ <li><b><i>Component implementations</i></b> that provide
+ <b><i>local services</i></b> in Java. Local services implement
+ internal application business logic such as tracking user state
+ and are not exposed remotely.</li>
+
+ <li><b><i>Component implementations</i></b> that have
+ <b><i>configuration properties</i></b> and <b><i>service
+ references</i></b> to other services</li>
+
+ <li><b><i>Components</i></b> that use and
+ <b><i>configure</i></b> <b><i>the properties and
+ references</i></b> of component implementations</li>
+
+ <li><b><i>SCA Services</i></b> to publish remotable services
+ via a <b><i>Web Service binding</i></b>.</li>
+
+ <li><b><i>SCA References&nbsp;</i></b> to consume remotable
+ services via a <b><i>Web Service binding</i></b></li>
+
+ <li>Assembling implementation, components, entry points and
+ external service into composite components.</li>
+
+ <li>Creating a module and all of its artifacts as part of a
+ <b><i>web application</i></b> to show a front-end access to SCA
+ services</li>
+
+ <li>The use of Data Access services to persist and retrieve
+ Service Data Objects from Apache Derby.</li>
+
+ <li style="text-align: left;">The use of &nbsp;existing Web
+ services in&nbsp; SCA.</li>
+ </ul><p>BigBank sample provides the following user services: account
+ balance,&nbsp;making deposits and withdrawals&nbsp; to purchase
+ and sell stock, and to view current stock value.<br>
+ The sample is organized into two SCA modules: webclient and
+ account. The webclient module functionality is to provide user
+ information and obtain user input. The account module is used to
+ retrieve and store user information, account information, current
+ stock information and the purchasing and selling of stock. The
+ two modules interact via web services through SCA references and
+ services.</p>
+ <br>
+
+ <div style="text-align: center;">
+ <img style="width: 381px; height: 169px;" alt=
+ "Overview of modules." title="Overview of modules." src=
+ "docs/modualoverview.png" align="middle">
+
+ <h5>Webclient</h5><br>
+ <a href=
+ "javascript:expandImage('docs/Show.Image.html?url=webclientmodule.png',1000,1100)">
+ <img style="width: 300px; height: 200px;" alt="Webclient files"
+ title="Click to expand" src="docs/webclientmodule.png"></a><br>
+
+ <p>&nbsp;</p>
+
+ <table style="text-align: left; width: 100%;" border="0"
+ cellpadding="1" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td align="left" valign="top" width="*">
+ <a href=
+ "javascript:expandImage('docs/Show.Image.html?url=webclientfiles.png',850,500)">
+ <img style="width: 262px; height: 360px;" alt=
+ "Webclient files" title="Click to expand" src=
+ "docs/webclientfiles.png"></a>&nbsp;<br>
+
+ <div style="text-align: center;">
+ <small><span style="font-style: italic;">click to
+ enlarge</span></small>
+ </div>
+ </td>
+
+ <td style="text-align: left;" align="left" valign="top"
+ width="80%">
+ <table style="text-align: left; width: 100%;" border=
+ "0" cellpadding="1" cellspacing="0">
+ <tbody>
+ <tr>
+ <td style="text-align: center;" colspan="3">
+ <span style=
+ "font-weight: bold; text-decoration: underline;">Java
+ source files implementing SCA components and
+ interfaces.</span></td>
+ </tr>
+
+ <tr>
+ <td style="width: 10%;">
+ AccountServiceComponentImpl.java</td>
+
+ <td>&nbsp;</td>
+
+ <td>Implements the account service.</td>
+ </tr>
+
+ <tr>
+ <td>AccountLoginServiceImpl.java</td>
+
+ <td></td>
+
+ <td>Implements the Login service.</td>
+ </tr>
+
+ <tr>
+ <td>LoginService.java</td>
+
+ <td></td>
+
+ <td>Interface for a services provided by a
+ login&nbsp; service component.</td>
+ </tr>
+
+ <tr>
+ <td>ProfileService.java</td>
+
+ <td></td>
+
+ <td>Interface for a service provided by a profile
+ component.</td>
+ </tr>
+
+ <tr>
+ <td>ProfileServiceImpl.java</td>
+
+ <td></td>
+
+ <td>Implements the profile component.</td>
+ </tr>
+
+ <tr>
+ <td>SimpleLoginServiceImpl.java</td>
+
+ <td></td>
+
+ <td>A simple in memory login service.</td>
+ </tr>
+
+ <tr>
+ <td style="text-align: center;" colspan="3">
+ <span style=
+ "font-weight: bold; text-decoration: underline;">Java
+ source files implementing Web HTML
+ interface.</span></td>
+ </tr>
+
+ <tr>
+ <td>AccountStatusTag.java</td>
+
+ <td></td>
+
+ <td>Implements a jsp tag that&nbsp;displays the
+ account information</td>
+ </tr>
+
+ <tr>
+ <td>StockStatusTag.java</td>
+
+ <td></td>
+
+ <td>Implements a jsp tag that displays the stock
+ information.</td>
+ </tr>
+
+ <tr>
+ <td>LoginBarrierTag.java</td>
+
+ <td></td>
+
+ <td>Implements a jsp tag that ensures the user is
+ logged in.</td>
+ </tr>
+
+ <tr>
+ <td>ServiceTag.java</td>
+
+ <td></td>
+
+ <td>Places an SCA service in the JSP page
+ context.</td>
+ </tr>
+
+ <tr>
+ <td>FormServlet.java</td>
+
+ <td></td>
+
+ <td>Process user input and uses the
+ AccountService component.</td>
+ </tr>
+
+ <tr>
+ <td>LoginServlet.java</td>
+
+ <td></td>
+
+ <td>Processes logging in and logout.</td>
+ </tr>
+
+ <tr>
+ <td style="text-align: center;" colspan="3">
+ <span style=
+ "font-weight: bold; text-decoration: underline;">Files
+ that will be loaded as resources along
+ classpath.</span></td>
+ </tr>
+
+ <tr>
+ <td>AccountService.wsdl</td>
+
+ <td></td>
+
+ <td>WSDL that &nbsp;defines the account
+ service.</td>
+ </tr>
+
+ <tr>
+ <td>bigbank-tags.tld</td>
+
+ <td></td>
+
+ <td>Defines the tag libs for the user
+ interface.</td>
+ </tr>
+
+ <tr align="center">
+ <td colspan="3"><span style=
+ "font-weight: bold; text-decoration: underline;">Files
+ located in WEB-INF directory.</span></td>
+ </tr>
+
+ <tr>
+ <td><a href="#SCDL">default.scdl</a></td>
+
+ <td></td>
+
+ <td>Application's SCA SCDL file.</td>
+ </tr>
+
+ <tr>
+ <td><a href="#Web.xml">web.xml</a></td>
+
+ <td></td>
+
+ <td>Application's web.xml file.</td>
+ </tr>
+
+ <tr align="center">
+ <td colspan="3"><span style=
+ "font-weight: bold; text-decoration: underline;">Generated
+ Files.</span></td>
+ </tr>
+
+ <tr>
+ <td>sdo source</td>
+
+ <td></td>
+
+ <td>Generated SDO. Created by <a href=
+ "#tuscany-sdo-plugin"><code><span style=
+ "font-weight: bold;">tuscany-sdo-plugin</span></code></a>
+ maven plugin.</td>
+ </tr>
+
+ <tr>
+ <td>wsdl2java-source</td>
+
+ <td></td>
+
+ <td>Generated SDO interface. Created by <a href=
+ "#tuscany-plugin-wsdl2java"><code><span style=
+ "font-weight: bold;">tuscany-plugin-wsdl2java</span></code></a>
+ maven &nbsp;plugin.</td>
+ </tr>
+
+ <tr align="center">
+ <td colspan="3"><span style=
+ "font-weight: bold; text-decoration: underline;">Build
+ files.</span></td>
+ </tr>
+
+ <tr>
+ <td><a href="#pom.xml">pom.xml</a></td>
+
+ <td></td>
+
+ <td>Maven build file.</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>&nbsp;</p><!-- account -->
+
+ <h5>Account</h5><br>
+ <a href=
+ "javascript:expandImage('docs/Show.Image.html?url=accountmodule.png',830,1400)">
+ <img style="width: 300px; height: 200px;" alt="Account module"
+ title="Click to expand" src="docs/accountmodule.png"></a><br>
+
+ <p>&nbsp;</p>
+
+ <table style="text-align: left; width: 100%;" border="0"
+ cellpadding="1" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td align="left" valign="top" width="*">
+ <a href=
+ "javascript:expandImage('docs/Show.Image.html?url=accountfiles.png',850,500)">
+ <img style="width: 262px; height: 360px;" alt=
+ "Webclient files" title="Click to expand" src=
+ "docs/accountfiles.png"></a>&nbsp;<br>
+
+ <div style="text-align: center;">
+ <small><span style="font-style: italic;">click to
+ enlarge</span></small>
+ </div>
+ </td>
+
+ <td style="text-align: left;" align="left" valign="top"
+ width="80%">
+ <table style="text-align: left; width: 100%;" border=
+ "0" cellpadding="1" cellspacing="0">
+ <tbody>
+ <tr>
+ <td style="text-align: center;" colspan="3">
+ <span style=
+ "font-weight: bold; text-decoration: underline;">Java
+ source files implementing SCA components and
+ interfaces.</span></td>
+ </tr>
+
+ <tr>
+ <td style="width: 10%;">
+ AccountServiceImpl.java</td>
+
+ <td>&nbsp;</td>
+
+ <td>Implements the account service
+ component.</td>
+ </tr>
+
+ <tr>
+ <td>AccountDataService.java</td>
+
+ <td></td>
+
+ <td>Interface defined for component implementing
+ &nbsp;an account's data service.</td>
+ </tr>
+
+ <tr>
+ <td>AccountDataServiceDASImpl.java</td>
+
+ <td></td>
+
+ <td>A Data Access Service (DAS) implementation of
+ of the Account Data Service.</td>
+ </tr>
+
+ <tr>
+ <td>AccountDataServiceImpl.java</td>
+
+ <td></td>
+
+ <td>A Data Service implementation not using
+ DAS.</td>
+ </tr>
+
+ <tr>
+ <td>AccountDBInit.java</td>
+
+ <td></td>
+
+ <td>A utility to just create the database and it
+ table and fill in some initial data.</td>
+ </tr>
+
+ <tr>
+ <td>StockQuote.java</td>
+
+ <td></td>
+
+ <td>A class to hold the StockQuote
+ information.</td>
+ </tr>
+
+ <tr>
+ <td>StockQuoteService.java</td>
+
+ <td></td>
+
+ <td>Interface defined for a component
+ implementing a stock quote service.</td>
+ </tr>
+
+ <tr>
+ <td>StockQuoteServiceImpl.java</td>
+
+ <td></td>
+
+ <td>Implements a fake stock quote service.</td>
+ </tr>
+
+ <tr>
+ <td>StockQuoteWebservicexServiceImpl.java</td>
+
+ <td></td>
+
+ <td>Implements an actual stock quote
+ service.</td>
+ </tr>
+
+ <tr>
+ <td style="text-align: center;" colspan="3">
+ <span style=
+ "font-weight: bold; text-decoration: underline;">Files
+ that will be loaded as resources along
+ classpath.</span></td>
+ </tr>
+
+ <tr>
+ <td>AccountService.wsdl</td>
+
+ <td></td>
+
+ <td>WSDL that &nbsp;defines the account
+ service</td>
+ </tr>
+
+ <tr>
+ <td>stockquotes.webservicex.wsdl</td>
+
+ <td></td>
+
+ <td>Actual stock quote service WSDL.</td>
+ </tr>
+
+ <tr>
+ <td><a href=
+ "#DAS_">DasAccountConfiguration.xml</a></td>
+
+ <td></td>
+
+ <td>Provides any needed configuration info
+ including datasource properties, table
+ definitions,</td>
+ </tr>
+
+ <tr align="center">
+ <td colspan="3"><span style=
+ "font-weight: bold; text-decoration: underline;">Files
+ located in WEB-INF directory.</span></td>
+ </tr>
+
+ <tr>
+ <td><a href="#SCDL">default.scdl</a></td>
+
+ <td></td>
+
+ <td>Application's SCA SCDL file.</td>
+ </tr>
+
+ <tr>
+ <td><a href="#Web.xml">web.xml</a></td>
+
+ <td></td>
+
+ <td>Application's web.xml file.</td>
+ </tr>
+
+ <tr align="center">
+ <td colspan="3"><span style=
+ "font-weight: bold; text-decoration: underline;">Generated
+ Files.</span></td>
+ </tr>
+
+ <tr>
+ <td>sdo source</td>
+
+ <td></td>
+
+ <td>Generated SDO. Created by&nbsp;<a href=
+ "#tuscany-sdo-plugin"><code><span style=
+ "font-weight: bold;">tuscany-sdo-plugin</span></code></a>
+ maven plugin.</td>
+ </tr>
+
+ <tr>
+ <td>wsdl2java-source</td>
+
+ <td></td>
+
+ <td>Generated SDO interface. Created
+ by&nbsp;<a href=
+ "#tuscany-plugin-wsdl2java"><code><span style=
+ "font-weight: bold;">tuscany-plugin-wsdl2java</span></code></a>
+ maven &nbsp;plugin.</td>
+ </tr>
+
+ <tr align="center">
+ <td colspan="3"><span style=
+ "font-weight: bold; text-decoration: underline;">Build
+ files.</span></td>
+ </tr>
+
+ <tr>
+ <td><a href="#pom.xml">pom.xml</a></td>
+
+ <td></td>
+
+ <td>Maven build file.</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div><br>
+ <br>
+
+
+ <h5><a name="pom.xml" id="pom.xml"></a>Pom.xml</h5>
+ <p>The directions
+ for maven&nbsp; how&nbsp; to build the each module is located in
+ each module's directory in the&nbsp;pom.xml file. &nbsp;The
+ application uses Java 1.5 and thus in the build &nbsp;plugin
+ section needs the following compiler directives:</p>
+ &nbsp;&nbsp;<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;plugin&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;configuration&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;source&gt;<span style=
+ "color: rgb(255, 0, 0); font-weight: bold;">1.5</span>&lt;/source&gt;<br>
+
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;target&gt;<span style=
+ "color: rgb(255, 0, 0); font-weight: bold;">1.5</span>&lt;/target&gt;<br>
+
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;/configuration&gt;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;/plugin&gt;</code><br>
+ <p>Both webclient and account uses three maven
+ plugins:&nbsp;<code style=
+ "font-weight: bold;">tuscany-sdo-plugin</code>,&nbsp;<code style=
+ "font-weight: bold;">tuscany-plugin-wsdl2java</code>,
+ and&nbsp;<code style=
+ "font-weight: bold;">tuscany-war-plugin</code>.
+ The&nbsp;tuscany-sdo-plugin is provided by Tuscany 's SDO project
+ while the other two are provided by the Tuscany SCA project.</p>
+ <p>The <code style="font-weight: bold;"><a name="tuscany-sdo-plugin"
+ id="tuscany-sdo-plugin"></a>tuscany-sdo-plugin</code>
+ &nbsp;references the WSDL's schema and generates all the files
+ located in target/sdo_source directory. &nbsp;The application
+ uses these classes as a databinding instead of having to deal
+ directly with XML that &nbsp;represents form as defined in the
+ WSDL's schema.</p>
+ <p>The <code style="font-weight: bold;"><a name=
+ "tuscany-plugin-wsdl2java" id=
+ "tuscany-plugin-wsdl2java"></a>tuscany-plugin-wsdl2java</code>
+ plugin generates a Java interface in the target/wsdl2java-source
+ directory that is used to define the inteface (prottype) in the
+ wsdl.</p>
+ <p>The <code style="font-weight: bold;">tuscany-war-plugin</code> is
+ used to add both the Tuscany runtime and any Tuscany&nbsp;
+ extensions required by the application in the war file.. Looking
+ at the pom.xml and search for &nbsp;"<code style=
+ "font-weight: bold;">tuscany-war-plugin"</code> you'll find the
+ plugin. &nbsp;Which extension you want loaded are specified in
+ the <code><span style=
+ "font-weight: bold;">extensions</span></code> section. The format
+ for this&nbsp; closely follows Maven's artifact naming. &nbsp;The
+ boolean <code><span style=
+ "font-weight: bold;">loadExtensionDependencies</span></code>
+ option if true will &nbsp;resolve all dependencies for each
+ extension listed here and also include them in the war file.
+ &nbsp;<br>
+ <br>
+
+ <h4>Application</h4>
+
+ <h5><a name="Web.xml" id="Web.xml"></a>Web.xml</h5><p>The web.xml
+ file in each module adds necessary "hooks" to initiate and
+ maintain the Tuscany SCA runtime in a web application host.<br>
+ &nbsp;</p>
+
+ <table style="text-align: left; width: 100%;" border="1"
+ cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td>
+ <pre>
+<small>&lt;listener&gt;<br>
+&lt;listener-class&gt;org.apache.tuscany.runtime.webapp.TuscanyContextListener&lt;/listener-class&gt;<br>
+&lt;/listener&gt;</small>
+</pre>
+ </td>
+
+ <td>This class initializes the Tuscany runtime when the
+ applications is started and helps finalize the Tuscany
+ runtime when the application has ended.</td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<small>&lt;servlet&gt;<br>
+&lt;servlet-name&gt;TuscanyServlet&lt;/servlet-name&gt;<br>
+&lt;display-name&gt;Tuscany Servlet&lt;/display-name&gt;<br>
+&lt;servlet-class&gt;org.apache.tuscany.runtime.webapp.TuscanyServlet&lt;/servlet-class&gt;<br>
+&lt;/servlet&gt;</small>
+</pre>
+ </td>
+
+ <td>This class provides the web applications servlet
+ interface to SCA components. &nbsp;The Axis websevices
+ binding extension requires this.</td>
+ </tr>
+
+ <tr>
+ <td>
+ <pre>
+<small>&lt;listener&gt;<br>
+&lt;listener-class&gt;org.apache.tuscany.runtime.webapp.TuscanySessionListener&lt;/listener-class&gt;<br>
+&lt;/listener&gt;</small>
+</pre>
+ </td>
+
+ <td>This listener helps provide SCA session support .</td>
+ </tr>
+ </tbody>
+ </table><br>
+ <p>The web application can be run in offline or online when
+ resolving dependencies required by the application or it's
+ required extensions. This is configured in the web.xml with the
+ context-param element with a parameter name <code><span style=
+ "font-weight: bold;">tuscany.online</span></code>. If&nbsp; not
+ specified or set to true, dependencies are resolved by searching
+ the local war repository, the local Maven repository, and remote
+ repositories. If specified and set to false, the remote
+ repositories will not be searched.</p>
+
+ <h5><a name="SCDL" id="SCDL"></a>SCDL</h5>
+ <p>Each module's SCA
+ application SCDL is located in the web application&nbsp;
+ WEB-INF/default.scdl file. &nbsp;This is the default location,
+ but within the web.xml it is possible to override this with a
+ context-param element &nbsp;with the name <code><span style=
+ "font-weight: bold;">tuscany.applicationScdlPath</span></code>.
+ &nbsp;The Tuscany System SCDL can also be overridden with another
+ context-param element with the name <code><span style=
+ "font-weight: bold;">tuscany.systemScdlPath</span></code>.<br>
+ The SCDL&nbsp; used by the BigBank application is defined by
+ <a href=
+ "http://www.osoa.org/download/attachments/35/SCA_AssemblyModel_V096.pdf?version=1"
+ target="_blank">SCA Assembly Model V0.96</a> , <a href=
+ "http://www.osoa.org/download/attachments/35/SCA_ClientAndImplementationModelforJava_v0.95.pdf?version=3"
+ target="_blank">SCA Client and Implementation Model for Java
+ (V0.95)</a> &nbsp;and the <a href=
+ "http://www.osoa.org/download/attachments/35/SCA_WebServiceBindings_V096-draft1.pdf?version=3"
+ target="_blank">SCA Web Service bindings</a> specifications.<br>
+ There is one extension to SCDL used by BigBank that is specific
+ to Tuscany that is used by SDO databinding extension.
+ &nbsp;The&nbsp;<code>import.sdo</code> element in the SCDL
+ specifies which&nbsp; SDO factories to register the SDO types.
+ &nbsp;In the case of BigBank the factory is the class generated
+ by the&nbsp;<code style=
+ "font-weight: bold;">tuscany-sdo-plugin</code> maven plugin. An
+ example of this follows:</p>
+ <pre>
+ <code>&lt;dbsdo:import.sdo xmlns:dbsdo="http://incubator.apache.org/tuscany/xmlns/databinding/sdo/1.0-incubator-M2"
+factory="com.bigbank.account.AccountFactory"/&gt; <br>
+</code>
+</pre>
+
+ <h5>Code</h5><p>The Java code for the most part just implements the
+ Web interface and the SCA components necessary to implement the
+ business logic. The code uses Java 5.0 annotations as documented
+ by the <a href=
+ "http://www.osoa.org/download/attachments/35/SCA_ClientAndImplementationModelforJava_v0.95.pdf?version=3"
+ target="_blank">SCA Client and Implementation Model for Java
+ (V0.95)</a> specifications. The samples uses one annotation that
+ is an Tuscany extension that is used by the databinding framework
+ to identify that the components expect to SDO s for complex data
+ types. An example of this is seen in the AccountService interface
+ which has the <code style=
+ "font-weight: bold;">@DataType(name="commonj.sdo.DataObject")</code>
+ annotation.</p>
+
+ <h4><a name="DAS_" id="DAS_"></a><span style=
+ "font-family: monospace;">RDB DAS</span></h4>
+
+ <p>The Relational Database DAS (RDB DAS) is used in this sample to access relational data in terms
+ of SDOs. All the code pertaining to this usage is contained to two one files:
+ AccountDataServiceDASImpl.java and DasAccountConfiguration.xml. The java file provides code that
+ instantiates and invokes the DAS and the XML file provides RDB DAS configuration.</p>
+
+ <p>The sample demonstrates a few of the RDB DAS capabilities including:</p>
+
+ <ul>
+
+ <li>reading a graph of SDOs based on a select query provided inline </li>
+ <li>reading a graph of SDOs based on a named select query defined in the config file </li>
+ <li>executing a named command to manually insert data</li>
+ <li>leveraging SDO Change Summary to by utilizing the DAS "applyChanges" method to flush graph modifications </li>
+ <li>utilizing the DAS column-converter framework </li>
+ <li>using the column/property name mapping (aliasing)</li>
+
+ </ul>
+
+ <p>This sample does not currently demonstrate a few other key DAS features including Object relationships, optimistic
+ concurrency control, and the use of convention over configuration. User level documentation for the RDB DAS can
+ be found in the <a href=
+ "http://wiki.apache.org/ws/Tuscany/TuscanyJava/DAS_Java_Overview/RDBDAS_Java_User_Guide"target="_blank">RDBDAS User's Guide</a>.
+ </p>
+ <p>This sample uses the RDB DAS as a utility. A future version of this sample will access the DAS as an SCA service.
+ </p>
+
+</body>
+</html>