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 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
Building the banking application with TXOJ ##### The Bank IDL Since a distributed version has been adopted to present the application with Transactional Object for Java, an IDL file named Bank.idl described below is needed. The difference with the Bank.idl presented in previous trails is the fact that the Bank interface inherits the CosTransactions::TransactionalObject interface. Since we consider now that a Bank object need to modify its list in a transactional, we consider now a Bank object as a CORBA transactional.
    module arjuna {
       module demo {
         module jts {
          module txojbank {

            interface Account : CosTransactions::TransactionalObject
            {
              float balance();
              void credit( in float value );
              void debit( in float value );
            };

            exception NotExistingAccount
            { };

            interface Bank : CosTransactions::TransactionalObject
            {
              Account create_account( in string name );
              Account get_account( in string name )
                raises( NotExistingAccount );
            };
           };
          };
         };
       };
The client program Basically the client program (BankClient.java) is equivalent to the one described in the distributed jts version with implicit propagation, the difference is on the package name. Implementing the Account Interface Implementing the Bank Interface Implementing the Bank Server.
Copyright 2002-2005 Arjuna Technologies All Rights Reserved. info@arjuna.com +44 191 243 0676