use of com.arjuna.wst.TransactionRolledBackException in project narayana by jbosstm.
the class TestClient method doGet.
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
UserTransaction ut = UserTransactionFactory.userTransaction();
log.info("starting the transaction...");
ut.begin();
log.info("transaction ID= " + ut.toString());
log.info("calling business Web Services...");
testService.doNothing();
log.info("terminating the transaction...");
terminateTransaction(ut, false);
} catch (final TransactionRolledBackException tre) {
log.info("Transaction rolled back");
} catch (Exception e) {
log.info("problem: ", e);
}
response.setContentType("text/plain");
PrintWriter out = response.getWriter();
out.println("finished");
out.close();
}
Aggregations