this.wrapper.localUOW.commit();
// all change sets and are cleared, but the cache is kept
this.wrapper.localUOW.clearForClose(false);
}
} else {
throw new RollbackException(ExceptionLocalization.buildMessage("rollback_because_of_rollback_only"));
}
}
}catch (RuntimeException ex){
if (this.wrapper.localUOW != null){
wrapper.getEntityManager().removeExtendedPersistenceContext();
this.wrapper.localUOW.release();
this.wrapper.localUOW.getParent().release();
}
if(! this.rollbackOnly) {
throw new RollbackException(ex);
} else {
// it's a RollbackException
throw ex;
}
} finally {