Verifying Installation
By default, ArjunaTS is installed in the directory
/opt/arjuna/ats-4.0
on Unix machines, and
C:\Program Files\Arjuna\ats-4.0
on Windows, except if a different location has been specified during ArjunaTS
installation. When installed, the ArjunaTS 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 ArjunaTS.
-
/docs: this directory contains
documentation on the way to installing, administering and programming ArjunaCore,
ArjunaTA and ArjunaTS.
-
/etc: this directory contains appropriate
properties files that can be used to configure the behaviour of the Arjuna Transaction Service.
-
/htdocs: this directory describes
all APIs defined by ArjunaTS
-
/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 ArjunaTS. 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 ArjunaTS 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 Arjuna 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 <arjunats_install_root>/bin/
- From a command prompt, cd to the directory containing the build.xml file
(<arjunats_install_root>/trail_map)
and type 'ant'. This will compile a set of sources files located under <arjunats_install_root>/trail_map/src
then create an application .jar file named arjunats-demo.jar. under
the directory <arjunats_install_root>/trail_map/lib
- Add the generated jar file to the CLASSPATH environment variable.
- Ensure that the jacorb (version 2.2.2) jar files are added in your CLASSPATH.
Ensure that ArjunaTS 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 Arjuna 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
arjunajts-properties.xml located under the
/etc directory of the ATS distribution.
More details on the way to configure the behavior of ArjunaTS 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 ArjunaTS
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)