01 <HTML>
02 <HEAD>
03 <%@ page errorPage="exception.jsp" %>
04 <link href="sample.css" rel="stylesheet"></link>
05 </HEAD>
06 <BODY>
07 <%@ include file="header.html" %>
08
09 This example starts a local transaction and commits it. This is to just
10 verify Persistence Provider Runtime is set up correctly.
11 <HR>
12
13 <%@ include file="common_service.jsp" %>
14
15 <H2>Testing Transaction</H2><BR>
16
17 <%
18 out.print(new java.util.Date() + ": Starting a transaction...");
19 service.getEntityManager().getTransaction().begin();
20 out.println("started<p>");
21 service.getEntityManager().getTransaction().commit();
22 out.println(new java.util.Date() + ": Committed the transaction...");
23 %>
24 </BODY>
25 </HTML>
|