How to use BTM as the transaction manager in Jetty 6.x
These instructions have been verified against BTM 1.1.
Before you can get the transaction manager and datasources via JNDI ENC (URLs starting with
|Table of Contents|
Step 1: Copy the BTM jars
Copy the following jars from the BTM distribution to the jetty6
- slf4j-jdk14.jar (or any other one available here)
Step 2: Configure BTM as the transaction manager
Copy the following into your jetty config file:
This will make the transaction manager available under this JNDI URL: java:comp/UserTransaction.
Step 3: Configure DataSources that are transaction aware
The easiest way to do this is to use the
DataSource that ship with BTM.
Again, we've used Derby as an example, but as the
LrcXADataSource uses only the class name and url of a
java.sql.Driver, you can use it with any database providing a JDBC driver.
Step 4: Configure datasources references in your web.xml
Before your code can access configured datasources via JNDI ENC URLs, you need to declare resource references in your