use of org.jaffa.persistence.exceptions.RollbackFailedException in project jaffa-framework by jaffa-projects.
the class UOW method rollback.
/**
* Rollbacks all the additions, deletions, updations.
* Note: This object will free up its connection to the database, and will no longer be available.
*
* @throws RollbackFailedException if any error occurs during the process.
*/
public void rollback() throws RollbackFailedException {
if (isActive()) {
RollbackFailedException ex = null;
try {
m_engine.rollback();
} catch (RollbackFailedException e) {
ex = e;
}
if (m_messagingEngine != null) {
try {
m_messagingEngine.rollback();
} catch (Exception e) {
ex = new RollbackFailedException(null, e);
}
}
// Close the connection, no matter what
close();
if (ex != null)
throw ex;
}
}
Aggregations