<!--
  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="XML Transaction Service Demonstration Application: Business Activities" rootpath="../..">
    <header>
        XML Transaction Service Demonstration Application: Business Activities
    </header>
    <content>
        <navigation>
            <links include="includes/trailmap_navigation.xml"/>
            <links title="Navigation">
                <link ref="index.html">Start Trailmap</link>
                <link ref="atomictransaction.html">Previous</link>
                <link ref="sourcecode.html">Next</link>
            </links>
        </navigation>

        <area title="Business Activities">
            <html>
                <p>
                    Business activities are an extended transaction model designed to support long running business processes.
                    Unlike traditional atomic transactions, business activities typically use a compensation model to support the reversal of previously performed work in the event of transaction cancellation (rollback).
                    This makes them more suitable for long duration processes and inter-enterprise coordination. However, it also requires the relaxation of traditional ACID properties, particularly isolation.
                </p>
                <p>
                    The programming of business activities can involve more effort than is required for atomic transactions, as less infrastructure is typically available.
                    For example, the XA support found in many enterprise databases handles the necessary locking, 2PC and other functions transparently, allowing databases to be used in atomic transactions with minimal programmer effort.
                    However, equivalent support for business activities, particularly with regard to compensation logic, must be added to the code of each new application by the programmer.
                </p>
                <p>
                    The demonstration application illustrates one possible approach to creating services for use in business activities. It shows how to create a transaction participant that can expose existing business logic, originally intended for use in atomic transactions, as a service suitable for use in a business activity.
                    This is a particularly common scenario for enterprises seeking to reuse existing logic by packaging it for use as a component in the composition of workflow type processes. <!-- TODO -->
                </p>
                <p>
                    To use the Business Activity transaction type in the sample application, simply select it from the pull down menu at the top of the client interface.
                    Notice that the client applications show the reservation resources as booked (committed) even before the transaction is terminated, subsequently performing a compensating transaction to reverse this effect if the transaction is cancelled.
                </p>
            </html>
        </area>
    </content>
    <footer/>
</page>
