graben commented on code in PR #17734:
URL: https://github.com/apache/camel/pull/17734#discussion_r2047263050
##########
components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java:
##########
@@ -171,12 +171,12 @@ public Object doInPreparedStatement(PreparedStatement ps)
throws SQLException {
total += count;
}
exchange.getIn().setHeader(SqlConstants.SQL_UPDATE_COUNT, total);
- if (manualCommit) {
+ if (manualCommit && !restoreAutoCommit) {
Review Comment:
Well, the question is if only JTA is a valid case that autocommit has been
set to false before SqlProducer is called. If yes exchange.isTransacted fits
better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]