Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
DOCUMENTATION: Jetty 6 - this wiki. Jetty 7 - at Eclipse. Jetty8 - at Eclipse. Jetty 9 - at Eclipse.
Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current ·  View Page History

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 lib directory:

  • lib/transactions_2_10.jar
  • lib/jta.jar
  • licenses/licenseJTA.jar

Step 2: Copy and install the Atomikos console webapp

Copy the following webapp to a jetty6 deployment directory, for example webapps-plus:

  • appservers/other/atomikos.war

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:

The com.atomikos.jdbc.SimpleDataSourceBean implements 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.

Labels
  • None
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery