Resource-based PlatformTransactionManager implementations defensively catch Throwable in doBegin in order to reliably close resource in case of OutOfMemoryError
Issue: SPR-10755
(cherry picked from commit 2e4eb9f)
This commit is contained in:
@@ -497,7 +497,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
|
||||
txObject.getSessionHolder().setSynchronizedWithTransaction(true);
|
||||
}
|
||||
|
||||
catch (Exception ex) {
|
||||
catch (Throwable ex) {
|
||||
if (txObject.isNewSession()) {
|
||||
try {
|
||||
if (session.getTransaction().isActive()) {
|
||||
|
||||
Reference in New Issue
Block a user