davsclaus commented on code in PR #17734:
URL: https://github.com/apache/camel/pull/17734#discussion_r2046657582


##########
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:
   Yes if using JTA/XA then you need to use a TX manager and setup this via 
spring or camel-jta, and this requires enabling the transacted DSL in the 
routes, so we then know `exchange.isTransacted`. 
   
   So if this is the case then this component can do something different.



-- 
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: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to