www.arjuna.com news company products standards research library forums contact
Trail map 1. Installation Content 2. The Sample Application 3. Deploying and Testing the Sample Application 4. Making the Sample Application Persistent 5. Recovery From Failure 6. Where Next? Navigation Home Previous Next Additional Trails Distributed Transaction Processing The X/Open DTP Model The OMG OTS Model Transactions in J2EE Configuring ATS Configuring the Recovery Manager ORB Portability Transactional Object For Java
| print this page
| email this page
The Sample Application #### The Banking Application 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. Figure 1 - The Banking Applications The client application: Initializes the banking object. Choose an operation to be performed on the banking object. Possible operations are: 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: to create an Account Object, then Get Balance: this operation invokes the bank to obtain the balance of an account. the account is first returned by the bank, then the account is asked to return its balance 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 Credit: this operation is performed to credit an account 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. Exit: This operation terminates the client Waits for a response. The Bank Object Creates Account Objects using name Maintains the list of created Accounts Returns, when asked, the Account Object requested by the client. If the Account doesn't exist an exception is returned to the client. An Account Object Performs operations requested by the client credit, withdraw (debit), and return the current balance. 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. Figure 2 - The Banking Application and the transactional Component
Copyright 2002-2005 Arjuna Technologies All Rights Reserved. info@arjuna.com +44 191 243 0676