HHH-13307 : On release of batch it still contained JDBC statements using JTA
(cherry picked from commit a7f017c3dc
)
This commit is contained in:
parent
329a1663ec
commit
24ff81d34e
|
@ -159,8 +159,12 @@ public abstract class AbstractBatchImpl implements Batch {
|
|||
clearBatch( statement );
|
||||
resourceRegistry.release( statement );
|
||||
}
|
||||
jdbcCoordinator.afterStatementExecution();
|
||||
// IMPL NOTE: If the statements are not cleared and JTA is being used, then
|
||||
// jdbcCoordinator.afterStatementExecution() will abort the batch and a
|
||||
// warning will be logged. To avoid the warning, clear statements first,
|
||||
// before calling jdbcCoordinator.afterStatementExecution().
|
||||
statements.clear();
|
||||
jdbcCoordinator.afterStatementExecution();
|
||||
}
|
||||
|
||||
protected void clearBatch(PreparedStatement statement) {
|
||||
|
|
Loading…
Reference in New Issue