JBoss logo


print this page
email this page

Verifying Installation

When installed, the binary release of JBossTS, JTS version, should have the following structure.
  • /bin: this directory contains commands to run the OTS transaction manager server (if required) and the Recovery Manager, and scripts to configure environment variables needed to execute JBossTS.
  • /docs: this directory contains documentation on the way to installing, administering and programming ArjunaCore, JBossTS JTA and JBossTS JTS.
  • /etc: this directory contains appropriate properties files that can be used to configure the behaviour of the JBoss Transaction Service.
  • /htdocs: this directory describes all APIs defined by JBossTS
  • /idl: this directory contains the CORBA idl files that may be registered with your interface repository prior to running any applications.
  • /jacorb: This directory contains the jacorb distribution.
  • /lib: this directory contains the jar files that contains packages defined by the JBossTS. These jar files shall be added in the CLASSPATH
  • /services: this directory contains the appropriates scripts, jar and configuration files allowing to start and stop standalone Transaction Service and Recovery Manager
  • /trail_map: contains examples applications

Testing your installation

To ensure that your JBossTS installation is fully operational, we will run the simple demo.

Please follow these steps before running the transactional applications

  • 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.
  • 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 <jbossts_install_root>/bin/
  • From a command prompt, cd to the directory containing the build.xml file (<jbossts_install_root>/trail_map) and type 'ant'. This will compile a set of sources files located under <jbossts_install_root>/trail_map/src then create an application .jar file named jbossts-demo.jar. under the directory <jbossts_install_root>/trail_map/lib
  • Add the generated jar file to the CLASSPATH environment variable.
  • Ensure that the jacorb is added in your CLASSPATH. Use only the patched version that ships with JBossTS.
    Ensure that JBossTS jar files appear before jacorb jar files.
  • Start the server. (HelloServer.java) (Note: The source code for the trailmap is fully documented and can often contain very useful tips and information that may not be reflected elsewhere in the trailmap)

java com.arjuna.demo.simple.HelloServer

  • Open another command prompt, go to the same /trail_map directory and start the client (HelloClient.java) . Be sure that the environment variable CLASSPATH is set with the same value as explained above.

java com.arjuna.demo.simple.HelloClient

In the client window you should see the following lines:

     Creating a transaction !
     Call the Hello Server !
     Commit transaction
     Done

In the server, which must be stopped by hand, you should see:

     Hello - called within a scope of a transaction

Setting properties

The JBoss Transaction Service has been designed to be highly configurable at runtime through the use of various property attributes. Although these attributes can be provided at runtime on the command line, it is possible (and may be more convenient) to specify them through the properties file jbossts-properties.xml located under the /etc directory of the JBossTS distribution.

More details on the way to configure the behavior of JBossTS can be found here.

Specifying the ORB to use

JDK releases from 1.2.2 onwards include a minimum ORB implementation from Sun. If using such a JDK in conjunction with another ORB it is necessary to tell the JVM which ORB to use. This happens by specifying the org.omg.CORBA.ORBClass
and org.omg.CORBA.ORBSingletonClass properties. In earlier versions of the JBossTS it was necessary to specify these properties explicitly, either on the command line of in the properties file. However, it is no longer a requirement to do this, as the ORB Portability classes will ensure that these properties are automatically set when required. Of course it is still possible to specify these values explicitly (and necessary if not using the ORB initialization methods)

Copyright 2002-2005 Arjuna Technologies. Copyright 2008 JBoss, a division of Red Hat. All Rights Reserved.