This example shows how to configure and lookup resources such as DataSources, a JTA transaction manager and a java.mail.Session in JNDI. The demo shows you how to perform a distributed transaction across two different databases, and how to send email.
Follow the instructions in the README-test-jndi.txt file in $JETTY-HOME/contexts.
Now you can start the demo:
> java -jar start.jar
If you want to use the Mail demonstration, you will need to edit the $JETTY-HOME/contexts/test-jndi.xml
file and change the smtp authentication information and properties appropriately for your environment.
Click Commit
to make a distributed update to 2 different databases, or Rollback
to prevent the update from happening.