Jetty and Annotations

This example shows how to use annotations.

Preparation

  1. Ensure that you have installed the jars for the transaction manager of your choice in $JETTY_HOME/lib/ext. This demo has been tested with JOTM and Atomikos.
  2. Make sure you have built this demo. Assuming your jetty src distro is installed at $JETTY_HOME:

      +  cd $JETTY_HOME/modules/examples/jetty-annotation-example-webapp
      +  mvn clean install
      + cp -R $JETTY_HOME/contexts-available/test-annotations.d $JETTY_HOME/contexts
      + cp $JETTY_HOME/contexts-available/test-annotations.xml $JETTY_HOME/contexts
    
  3. Set up the configuration files with the transaction manager of your choice:
      +  cd $JETTY_HOME/contexts
      +  edit annotations-context.xml and uncomment one of the transaction manager setups
    

Now you can start the demo:

   java -DOPTIONS=plus,annotations,default -jar start.jar 

The Test