If you need transaction propagation between business logic in different servers, you can use the JTS API. Although you can use it directly, it is typical to access it via the standard JTA classes. It is a drop-in replacement for the default local-only JTA implementation. The necessary classes are already in place, and you only need to modify the
jbossts-properties.xml file to move between the JTA and JTS modules.
jbossts-properties.xml file is located in the
<JBOSS_HOME>/docs/examples/transactions/ directory. Consult the
README.txt file in the same directory for more information about changes that need to be made to other files, including the
transactions-jboss-beans.xml file. An ANT script is provided to perform all of the steps automatically, but it is recommended to consult the
README.txt carefully before running the script, as well as backing up your existing configuration.
The JTS requires the server configuration to also contain the CORBA ORB service. The "all" server profile referenced in the examples is a good starting point. The choice of JTS or JTA impacts the entire server, and JTS does require additional resources. Therefore, only use it when it is needed.
At application start-up, a server that is configured to use JTA outputs log files like this one:
INFO [TransactionManagerService] JBossTS Transaction Service (JTA version - ...)
If JTS is enabled, the message looks like this one:
INFO [TransactionManagerService] JBossTS Transaction Service (JTS version - ...)