<?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>Trail map: Running and Testing Examples</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="part4.html">Previous</link>
				<link ref="part6.html">Next</link>
			</links>
			<links include="includes/trailmap_additional.xml" />
		</navigation>
		<area title="Deploying and Testing The Banking Application">
			<html>
				<p>
					Assuming that the JBoss Transactioning product has
					been installed, this trail provides a set of
					examples that show how to build transactional
					applications. Two types of transactional
					applications are presented, those using the JTA
					interface and those accessing to the JTS (OTS)
					interfaces.
				</p>
				<p>
					Please follow these steps before running the
					transactional applications
				</p>
				<ul>
					<li>
						Ensure you have the Ant build system installed.
						Ant is a Java build tool, similar to make. It is
						available for free from http://ant.apache.org/
						The sample application requires version 1.5.1 or
						later.
					</li>
					<li>
						The PATH and CLASSPATH environment variables
						need to be set appropriately to use JBoss
						Transaction Service. To make this easier, we
						provide a shell script setup_env.sh (and for
						Windows a batch file setup_env.bat) in the
						directory
						<font face="Courier New, Courier, mono">
							&lt;jbossts_install_root&gt;/bin/
						</font>
					</li>
					<li>
						From a command prompt, cd to the directory
						containing the build.xml file
						(&lt;jbossts_install_root&gt;/trail_map) and
						type 'ant', unless already done in the
						<a class="linkscoloured"
							href="part1.html#TestInstall">
							installation section
						</a>
						. This will compile a set of sources files
						located under
						&lt;jbossts_install_root&gt;/trail_map/src then
						create an application .jar file named
						<em>jbossts-demo.jar</em>
						. under the directory
						&lt;jbossts_install_root&gt;/trail_map/lib
					</li>
					<li>
						Add the generated jar file to the CLASSPATH
						environment variable.
					</li>
					<li>
						The demo application is provided in several
						ways, accessing persistent data or not. When
						JDBC is used as a mean to access a database,
						Oracle 9i is used. For this aim the appropriate
						Oracle libraries (classes12.zip) should be add
						in the CLASSPATH environment variable.
					</li>
				</ul>
				<p>
					<h5>Local transaction with JTA</h5>
					To configure JBossTS for such transaction, edit the
					jbossts-properties.xml file and set the following
					properties to the appropriate values:

					<pre>
		&lt;property
		name="com.arjuna.ats.jta.jtaTMImplementation"
		value="com.arjuna.ats.internal.jta.transaction.
		arjunacore.TransactionManagerImple"/>
		&lt;property
		name="com.arjuna.ats.jta.jtaUTImplementation"
		value="com.arjuna.ats.internal.jta.transaction.
		arjunacore.UserTransactionImple"/>
					</pre>
					<h5>Distributed transaction with JTA</h5>
					While for a distributed transactions case, JBossTS need
					to be configured as follow:
					<pre>
		&lt;property
		name="com.arjuna.ats.jta.jtaTMImplementation"
		value="com.arjuna.ats.internal.jta.transaction.
		jts.TransactionManagerImple"/> &lt;property
		name="com.arjuna.ats.jta.jtaUTImplementation"
		value="com.arjuna.ats.internal.jta.transaction.
		jts.UserTransactionImple"/>
					</pre>

					Using JTA to create a distributed transaction need
					the creation of an ORB instance as done by a JTS
					application (see JTS versions of the banking
					application), the difference is in the interface
					used to demarcate and control transactions.

				</p>

				<h5>
					The application programming interfaces used by the
					Banking Application
				</h5>
				<p>
					To illustrate the programming interfaces
					possibilities enabled by JBossTS, the banking
					application is provided in several versions: a
					version that uses the JTA API and a second that uses
					JTS/OTS interfaces.
				</p>
				<p>
					This trail focuses to understanding concepts related
					to the creation of transactions and the behavior of
					the commitment protocol, while the next trail
					illustrates the similar application with persistent
					data.
				</p>
				<ul>
					<li>
						<a class="linkscoloured"
							href="part5_testing_jta.html">
							Testing the Banking application with JTA
						</a>
					</li>
					<li>
						<a class="linkscoloured"
							href="part5_testing_jts.html">
							Testing the Banking application with JTS
						</a>
					</li>
				</ul>
			</html>
		</area>
	</content>
	<footer />
</page>
