arjuna logoarjuna strap line


print this page
email this page

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.

To proceed, you will need to install ant (http://ant.apache.org/) 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.

This release has been tested against JBoss 4.2.2.GA and JBoss 5.0.Beta4.

Deploying into JBoss 4.2.

  1. Install JBoss 4.2.

  2. Edit the <xts-home>/demo/jboss.properties file, replacing the JBOSS_HOSTNAME and JBOSS_PORT with the values used by your JBoss server web listener. Replace JBOSS_URLSTUB with a path used as the location for the demo application web services

  3. Set environment variable JBOSS_HOME to point to the root directory of your JBoss installation.

  4. Compile the application source, build the application archive file and deploy it into JBoss deploy directory by typing 'build.sh jboss clean sa-deploy' on Unix or 'build.bat jboss clean sa-deploy' on Windows

  5. Run the application server by using the run.sh or run.bat command.

  6. Invoke the demo client by browsing the URL (e.g.): http://hostname:port/xts-demo/

n.b. the JaxRPC based version of the demo can be built and deployed by substituting target 'sa-deploy' in the commands listed above with the alternative target 'sa-deployrpc'

This release of the demo application includes the ability to run the client against a mixture of backend webservices. The property files contain the URLs of the webservices, which can be changed to exercise any combination and demonstrate a distributed transaction. The services are started using the same mechanism as above. Each platform will be running its own copy of the webservices but the deployed client will access those services configured in the relevant property file.

Deploying into JBoss 5.0.Beta4.

Note that at present JBoss JTS and XTS must be manually deployed into JBoss 5.0. In full 5.0 releases the XTS component should be bundled into the release as a service archive.

  1. Install JBoss 5.0.

  2. Build and deploy JBoss JTS and JBoss XTS service archive (execute 'ant jbossjts' in the JBossTS source tree and follow the deployment instructions in file INSTALL of the resulting JBossTS install tree).

  3. Edit the <xts-home>/demo/jboss.properties file, replacing the JBOSS_HOSTNAME and JBOSS_PORT with the values used by your JBoss server web listener. Replace JBOSS_URLSTUB with a path used as the location for the demo application web services. (n.b. at present the hostname and port must be supplied as localhost and 8080

  4. Set environment variable JBOSS_HOME to point to the root directory of your JBoss installation.

  5. Compile the application source, build the application archive file and deploy it into JBoss deploy directory by typing 'build.sh jboss clean deploy' on Unix or 'build.bat jboss clean deploy' on Windows

  6. Run the application server by using the run.sh or run.bat command.

  7. Invoke the demo client by browsing the URL (e.g.): http://hostname:port/xts-demo/

n.b. the JaxRPC based version of the demo can be built and deployed by substituting target 'deploy' in the commands listed above with the alternative target 'deployrpc'

Using the application

  • 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.

  • 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. ]

  • 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.

Copyright 2002-2005 Arjuna Technologies All Rights Reserved.
info@arjuna.com +44 191 243 0676