3
<TITLE>Powered By Jetty</TITLE>
4
<META http-equiv="Pragma" content="no-cache">
5
<META http-equiv="Cache-Control" content="no-cache,no-store">
8
<A HREF="http://jetty.mortbay.org/jetty6"><IMG SRC="http://jetty.mortbay.org/jetty/images/jetty_banner.gif"></A>
10
<h1>Jetty and JNDI</h1>
13
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.
18
Follow the instructions in the README-test-jndi.txt file in $JETTY-HOME/contexts.
20
Now you can start the demo:
27
<p>If you want to use the Mail demonstration, you will need to edit the <code>$JETTY-HOME/contexts/test-jndi.xml</code> file and change the smtp authentication information and properties appropriately for your environment.
29
<h2>The Datasources/Transaction Demo</h2>
31
Click <code>Commit</code> to make a distributed update to 2 different databases, or <code>Rollback</code> to prevent the update from happening.
33
<form action="test" method="post">
34
<input type="radio" name="completion" value="commit" checked="true"> Commit<BR>
35
<input type="radio" name="completion" value="rollback"> Rollback<BR>
37
<button type="submit">Completion</button>
39
<h2> The Mail Demo </h2>
42
<form action="test" method="post">
43
<p>Send a test email to: <input type="text" name="mailto" maxlength="30"/></p>
44
<p>From: <input type="text" name="mailfrom" maxlength="30"/></p>
45
<button type="submit">Send</button>