mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Resource-based PlatformTransactionManager implementations defensively catch Throwable in doBegin in order to reliably close resource in case of OutOfMemoryError
Issue: SPR-10755
This commit is contained in:
+1
-1
@@ -238,7 +238,7 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan
|
||||
}
|
||||
}
|
||||
|
||||
catch (Exception ex) {
|
||||
catch (Throwable ex) {
|
||||
DataSourceUtils.releaseConnection(con, this.dataSource);
|
||||
throw new CannotCreateTransactionException("Could not open JDBC Connection for transaction", ex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user