Consistent reset of resource holders on doBegin failure

Issue: SPR-12280
(cherry picked from commit e58b33a)
This commit is contained in:
Juergen Hoeller
2014-10-06 20:31:45 +02:00
parent c672678423
commit 9758bc7833
7 changed files with 35 additions and 19 deletions

View File

@@ -513,6 +513,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
}
finally {
SessionFactoryUtils.closeSession(session);
txObject.setSessionHolder(null);
}
}
throw new CannotCreateTransactionException("Could not open Hibernate Session for transaction", ex);