DataSourceTransactionManager resets ConnectionHolder on doBegin failure
Issue: SPR-12280
This commit is contained in:
parent
05c995cfb3
commit
fd69ee541e
|
@ -238,7 +238,10 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan
|
|||
}
|
||||
|
||||
catch (Throwable ex) {
|
||||
if (txObject.isNewConnectionHolder()) {
|
||||
DataSourceUtils.releaseConnection(con, this.dataSource);
|
||||
txObject.setConnectionHolder(null, false);
|
||||
}
|
||||
throw new CannotCreateTransactionException("Could not open JDBC Connection for transaction", ex);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue