use of com.arjuna.ats.jta.exceptions.RollbackException in project narayana by jbosstm.
the class TestClient method doGet.
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String result = "OK";
try {
log.info("starting the transaction...");
userTransaction.begin();
log.info("transaction ID= " + userTransaction.toString());
log.info("calling business Web Services...");
testService.doNothing();
log.info("terminating the transaction...");
terminateTransaction(false);
} catch (final RollbackException re) {
log.info("Transaction rolled back");
result = re.getClass().getName();
} catch (Exception e) {
log.info("problem: ", e);
result = e.getClass().getName();
}
response.setContentType("text/plain");
PrintWriter out = response.getWriter();
out.println("finished : " + result);
out.close();
}
use of com.arjuna.ats.jta.exceptions.RollbackException in project narayana by jbosstm.
the class ExceptionsUnitTest method test.
@Test
public void test() throws Exception {
InactiveTransactionException ex = new InactiveTransactionException();
ex = new InactiveTransactionException("foobar");
NotImplementedException exp = new NotImplementedException();
exp = new NotImplementedException("foobar");
exp = new NotImplementedException("foobar", new NullPointerException());
exp = new NotImplementedException(new NullPointerException());
RollbackException exp2 = new RollbackException();
exp2 = new RollbackException("foobar");
exp2 = new RollbackException("foobar", new NullPointerException());
exp2 = new RollbackException(new NullPointerException());
UnexpectedConditionException ex2 = new UnexpectedConditionException();
ex2 = new UnexpectedConditionException("foobar");
}
Aggregations