public void recoverFromIDMError(Exception e) {
try {
// We need to restart Hibernate transaction if it's available. First rollback old one and then start new one
Transaction idmTransaction = idmService_.getIdentitySession().getTransaction();
if (idmTransaction.isActive()) {
idmTransaction.rollback();
idmTransaction.start();
log.info("IDM error recovery finished. Old transaction has been rolled-back and new transaction has been started");
}
} catch (Exception e1) {
log.warn("Error during recovery of old error", e1);