3
Copy or move the $JETTY-HOME/contexts-available/test-annotations.d
4
directory to $JETTY-HOME/contexts, and copy or move the
5
$JETTY-HOME/contexts-available/test-annotations.xml file to
8
Edit $JETTY-HOME/contexts/test-annotations.xml and uncomment
9
the setup for the transaction manager of your choice. The demo
10
works with either JOTM (http://jotm.objectweb.org) or Atomikos
11
(http://www.atomikos.com).
13
Download and copy the jar files necessary for your transaction
14
manager to $JETTY-HOME/lib/ext. See the jetty wiki pages for
15
JOTM(http://docs.codehaus.org/display/JETTY/JOTM) and
16
Atomikos (http://docs.codehaus.org/display/JETTY/Atomikos)
19
The example uses the Derby database, so also download the
20
derby.jar and derbytools.jar file from the Derby site
21
(http://db.apache.org/derby) and put them in $JETTY-HOME/lib/ext.
27
You run the demo like so:
29
java -DOPTIONS=plus,ext,annotations,default -jar start.jar
32
Adding Support for a Different Transaction Manager
33
--------------------------------------------------
35
1. Edit the filter.properties file in
36
$JETTY-HOME/modules/examples/jetty-annotation-example-webapp/src/etc/templates
37
and add a new set of token and replacement strings following the
38
pattern established for ATOMIKOS and JOTM.
40
2. Edit the jetty-env.xml file in
41
$JETTY-HOME/modules/examples/jetty-annotation-example-webapp/src/etc/templates
42
and add configuration for new transaction manager following the
43
pattern established for the other transaction managers.
45
3. Edit the annotations-context.xml file in
46
$JETTY-HOME/modules/examples/jetty-annotation-example-webapp/src/etc/templates
47
and add configuration for the new transaction manager following
48
the pattern established for the other transaction managers.
50
4. Rebuild $JETTY-HOME/modules/examples/jetty-annotation-example-webapp (mvn clean install).