How to use Atomikos as the transaction manager in jetty6
These instructions have been verified against Atomikos 2.10.
Step 1: Copy the Atomikos jars
Copy the following jars from your Atomikos installation to the jetty6
Step 2: Copy and install the Atomikos console webapp
Copy the following webapp to a jetty6 deployment directory, for example
If you are using the
etc/jetty-plus.xml configuration file and you are deploying from
webapps-plus you won't need to configure the webapp for jetty6, as the
etc/jetty-plus.xml file automatically deploys everything in
webapps-plus. If you are doing something different, you can use the following xml snippet to configure the Atomikos console webapp for jetty6:
Don't forget to substitute
MY/DEPLOY/DIRECTORY with the location of your deploy directory.
Step 3: Configure Atomikos as the transaction manager
Copy the following into your jetty config file:
Step 4: Configure DataSources that are transaction aware
The easiest way to do this is to use the DataSources that ship with Atomikos. Here's an example of using an XA aware DataSource:
javax.sql.DataSource and interacts with the javax.sql.XADataSource provided in this instance by Derby's. There is more documentation available from the Atomikos site on using their DataSources.