try {
tm = getTransactionManager();
}
catch(Exception e) {
NotSupportedException nse =
new NotSupportedException(e.getMessage());
nse.initCause(e);
throw nse;
}
try {
transaction = tm.suspend();
} catch (Exception e) {
NotSupportedException nse = new NotSupportedException(
_loc.get("exc-suspend-tran", e.getClass()).getMessage());
nse.initCause(e);
throw nse;
}
runnable.run();
try {
tm.resume(transaction);
} catch (Exception e) {
try {
transaction.setRollbackOnly();
}
catch(SystemException se2) {
throw new GeneralException(se2);
}
NotSupportedException nse =
new NotSupportedException(
_loc.get("exc-resume-tran", e.getClass()).getMessage());
nse.initCause(e);
throw nse;
}
}