<!--
  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-2008,
  @author JBoss Inc.
-->
<page title="XML Transaction Service Demonstration Application: Deploying the sample application" rootpath="../..">
    <header>
        XML Transaction Service Demonstration Application: Deploying the sample application
    </header>
    <content>
        <navigation>
            <links include="includes/trailmap_navigation.xml"/>
            <links title="Navigation">
                <link ref="index.html">Start Trailmap</link>
                <link ref="about.html">Previous</link>
                <link ref="atomictransaction.html">Next</link>
            </links>
        </navigation>

        <area title="Deploying the sample application">
            <html>
                <p>
                    To run the sample application, you must compile the source code; bundle it, along with the required metadata files, into appropriate deployment constructs and then deploy these into the application container. This process is somewhat involved, but fortunately is completely automated by an ant build script.
                </p>
                <p>
                    To proceed, you will need to install ant (<a class="linkscoloured" href="http://ant.apache.org/" target="_blank">http://ant.apache.org/</a>) to take advantage of the supplied build file. Version 1.6.1 or later of ant is recommended for this application. The application may not function correctly with versions prior to 1.5.
                </p>
                <p>
                    This release has been tested against JBoss 5.0.0.CR1.
                </p>
            <p>
                Deploying into JBoss 5.0.0.CR1.
            </p>
            <ol>
                <li><p>Install JBoss 5.0.</p>
                </li>
                <li><p>Set environment variable <code>JBOSS_HOME</code> to point to the root directory of your JBoss installation.</p></li>
                <li><p>(Optional**) Build and deploy JBoss JTA or JBoss JTS (execute '<code>ant jbossjta</code>' or '<code>ant jbossjts</code>' in the JBossTS source tree and follow the deployment instructions in file INSTALL of the resulting JBossTS install tree).</p>
                </li>
                <li><p>(Optional**) Build JBoss XTS (follow the XTS build instructions in file INSTALL of the JBossTS install tree).</p>
                </li>
                <li><p>Deploy the XTS service archive <code>&lt;jbossts 4.4.0 xts&gt;/xts-install/sar/jbossxts.sar</code> into the JBoss 5.0 server deploy directory.  n.b. due to a bug in the JBossWS implementation it is only possible to deploy the XTS service archive after starting JBoss AS.</p>
                </li>
                <li><p>Edit the <code>&lt;jbossts 4.4.0 xts&gt;/xts-install/demo/jboss.properties</code> file, replacing the <code>JBOSS_HOSTNAME</code> and <code>JBOSS_PORT</code> with the bind address and port used by your JBoss server and Jboss Web listener. Replace <code>JBOSS_URLSTUB</code> with a path used as the location for the demo application web services.</p></li>
                <li><p>Compile the application source under <code>&lt;jbossts 4.4.0 xts&gt;/xts-install/demo</code>, build the application archive file and deploy it into JBoss deploy directory by typing '<code>build.sh jboss clean deploy</code>' on Unix or '<code>build.bat jboss clean deploy</code>' on Windows</p></li>
                <li><p>Run the application server by using the run.sh or run.bat command.</p></li>
                <li><p>Invoke the demo client by browsing the URL (e.g.): <code>http://hostname:port/xts-demo/</code></p></li>
            </ol>
            <p>
               ** the JBoss 5.0 installation may include a pre-built, pre-installed JBossTS build and a pre-built XTS service archive.
            </p>
            <p>
                n.b. the JaxRPC based version of the demo can be built and deployed by substituting target '<code>deploy</code>' in the commands listed above with the alternative target '<code>deployrpc</code>'
            </p>
                <p>Using the application</p>
                <ul>
                    <li><p>When invoked, the client will attempt to begin a transaction, reserve theatre tickets, a restaurant table and a taxi according to the parameters you have selected, then commit the transaction. It will log each step of its activity to the console window. As the transaction proceeds, each of the Web Services will pop up a window of its own in which its state and activity log can be seen. Some events in the service code are also logged to the console.</p></li>
                    <li><p>The three server applications support a manual transaction control mode which you can use to simulate transaction failures. Use the Change Mode button on the server GUIs. Notice that the client throws an exception if the transaction is rolled back. [ Note: The manual commit mode overrides the normal availability checks in the services, so overbooking may occur. ]</p></li>
                    <li><p>The following pages explain the two transaction models available in the XML Transaction , Atomic Transactions and Business Activities. Reading the following pages will help you understand the events taking place within the sample application.</p></li>
                </ul>
            </html>
        </area>
    </content>
    <footer/>
</page>
