Jetty has moved!
Jetty is a project at the Eclipse Foundation.
Homepage:http://www.eclipse.org/jetty
Downloads: http://download.eclipse.org/jetty/
Documentation:http://www.eclipse.org/jetty/documentation/current/
About:http://www.eclipse.org/jetty/about.php
Jetty Powered:http://www.eclipse.org/jetty/powered/
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
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

« Previous Version 2 Next »

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:

<New class="com.atomikos.icatch.jta.UserTransactionImp"/> <-- for Atomikos OpenSource (AtomikosTransactionsEssentials-3.0.1)Dependencies:  atomikos-util.jar, transactions-api.jar, transactions-jta.jar, transactions.jar, jta.jar
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.

  • No labels
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