<?xml version="1.0"?>
<!--
  JBoss, Home of Professional Open Source
  Copyright 2006, Red Hat Middleware LLC, and individual contributors
  as indicated by the @author tags.
  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 Lesser General Public License, v. 2.1.
  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 Lesser General Public License for more details.
  You should have received a copy of the GNU Lesser General Public License,
  v.2.1 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="JBossTS Trail map: Running and Testing Examples" rootpath="../..">
	<header>         What is Transactional Object For Java  </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="part6_txoj_banking_deploy.html">Previous</link>
			</links>
			<links include="includes/trailmap_additional.xml"/>
		</navigation>
		<area title="Building the banking application with TXOJ">
			<html>
				<h5>The Bank IDL</h5>
				<p>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.</p>

<pre>module arjuna {
   module demo {
     module jts {
      module txojbank {

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

        exception NotExistingAccount
        { };

        interface Bank <strong>: CosTransactions::TransactionalObject</strong>
        {
          Account create_account( in string name );
          Account get_account( in string name )
            raises( NotExistingAccount );
        };
       };
      };
     };
   };</pre>

				<ul>
					<li>The client program<br/>
    Basically the client program (<a class="linkscoloured" href="../src/com/arjuna/demo/jts/txojbank/BankClient.java">BankClient.java</a>)
    is equivalent to the one described in the distributed jts version with implicit
    propagation, the difference is on the package name.</li>
					<li>
						<a class="linkscoloured" href="part6_txoj_banking_account.html">Implementing the Account Interface</a>
					</li>
					<li>
						<a class="linkscoloured" href="part6_txoj_banking_bankImpl.html">Implementing the Bank Interface</a>
					</li>
					<li>
						<a class="linkscoloured" href="part6_txoj_banking_bankServer.html">Implementing the Bank Server</a>.</li>
				</ul>
			</html>
		</area>
	</content>
	<footer/>
</page>
