<?xml version="1.0"?>
<!--
  JBoss, Home of Professional Open Source
  Copyright 2006, JBoss Inc., and individual contributors as indicated
  by the @authors tag.  All rights reserved. 
  See the copyright.txt in the distribution for a full listing 
  of individual contributors.
  This copyrighted material is made available to anyone wishing to use,
  modify, copy, or redistribute it subject to the terms and conditions
  of the GNU General Public License, v. 2.0.
  This program is distributed in the hope that it will be useful, but WITHOUT A 
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
  PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  You should have received a copy of the GNU General Public License,
  v. 2.0 along with this distribution; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
  MA  02110-1301, USA.
  
  (C) 2005-2006,
  @author JBoss Inc.
-->
<page title="Arjuna Technologies Limited: Trail map: Running and Testing Examples" rootpath="../.."> 	<header>         Trail map: The Banking Application     </header> 	<content> 		<navigation> 			<links include="includes/www_arjuna_com_navigation.xml"/> 			<links include="includes/trailmap_navigation.xml"/> 			<links title="Navigation"> 				<link ref="index.html">Home</link> 				<link ref="part1.html">Previous</link> 				<link ref="part5.html">Next</link> 			</links> 			<links include="includes/trailmap_additional.xml"/> 		</navigation> 		<area title="The Sample Application"> 			<html> 				<h4>The Banking Application</h4> 				<p>The sample application consists of a banking application that involves a bank    able to manage accounts on behalf of clients. Clients can obtain information    on accounts and perform operations such credit, withdraw and transfer money    from one account to an other.</p> 				<p> 					<strong> 						<img src="includes/banking_application_1.GIF"/> 					</strong> 				</p> 				<p>Figure 1 - The Banking Applications</p> 				<ol> 					<li>The client application:</li> 				</ol> 				<ul> 					<li>Initializes the banking object. </li> 					<li> Choose an operation to be performed on the banking object. Possible operations      are:      <ul> 							<li>Create Account: this operation asks the bank to create a new account credit it with  							the first amount provided in the request.         The creation consists:          <ul> 									<li>to create an Account Object, then</li> 								</ul> 							</li> 							<li>Get Balance: this operation invokes the bank to obtain the balance of          an account.          <ul> 									<li>the account is first returned by the bank, then</li> 									<li>the account is asked to return its balance</li> 								</ul> 							</li> 							<li>Withdraw: this operation is invoked to withdraw money from an account.          If the final balance is negative the withdraw is refused and the associated          transaction aborted</li> 							<li>Credit: this operation is performed to credit an account</li> 							<li>Transfer: This operation is used to transfer money from an account to          another. If the transfer leads to get a negative balance of the debited          account, the transfer is refused and the associated transaction is aborted.</li> 							<li>Exit: This operation terminates the client</li> 						</ul> 					</li> 					<li>Waits for a response. </li> 				</ul> 				<ol start="2"> 					<li>The Bank Object</li> 				</ol> 				<ul> 					<li>Creates Account Objects using name</li> 					<li>Maintains the list of created Accounts</li> 					<li>Returns, when asked, the Account Object requested by the client. If the      Account doesn't exist an exception is returned to the client.</li> 				</ul> 				<ol start="3"> 					<li>An Account Object</li> 				</ol> 				<ul> 					<li>Performs operations requested by the client      <ul> 							<li>credit,</li> 							<li>withdraw (debit), and </li> 							<li>return the current balance.</li> 						</ul> 					</li> 				</ul> 				<p>Each operation provided to the client leads to the creation of a transaction;    therefore in order to commit or rollback changes made on an account, a resource is    associated with the account to participate to the transaction    commitment protocol. According to the final transaction decision, the resource    is able to set the Account either to its initial state (in case of rollback)    or to the final state (in case of commit). From the transactional view, Figure    2 depicts of transactional components.</p> 				<p> 					<img src="includes/banking_application_2.GIF"/> 				</p> 				<p>Figure 2 - The Banking Application and the transactional Component</p> 			</html> 		</area> 	</content> 	<footer/> </page> 
