davsclaus commented on a change in pull request #7014: URL: https://github.com/apache/camel/pull/7014#discussion_r812625620
########## File path: components/camel-jta/src/main/java/org/apache/camel/jta/JtaTransactionErrorHandler.java ########## @@ -64,4 +69,16 @@ public ErrorHandler clone(Processor output) { return answer; } + @Override + public boolean process(final Exchange exchange, final AsyncCallback callback) { + if (!exchange.isTransacted()) { + LOG.debug("mark " + exchange + " transacted"); + exchange.getUnitOfWork().beginTransactedBy("jta"); + super.process(exchange, callback); + exchange.getUnitOfWork().endTransactedBy("jta"); Review comment: I think you need to have the endTransacted in a try .. finally block to ensure it will be ended ########## File path: components/camel-jta/src/main/java/org/apache/camel/jta/JtaTransactionErrorHandler.java ########## @@ -64,4 +69,16 @@ public ErrorHandler clone(Processor output) { return answer; } + @Override + public boolean process(final Exchange exchange, final AsyncCallback callback) { + if (!exchange.isTransacted()) { + LOG.debug("mark " + exchange + " transacted"); + exchange.getUnitOfWork().beginTransactedBy("jta"); Review comment: Maybe use camel-jta instead of jta ########## File path: components/camel-jta/src/main/java/org/apache/camel/jta/JtaTransactionErrorHandler.java ########## @@ -64,4 +69,16 @@ public ErrorHandler clone(Processor output) { return answer; } + @Override + public boolean process(final Exchange exchange, final AsyncCallback callback) { + if (!exchange.isTransacted()) { + LOG.debug("mark " + exchange + " transacted"); + exchange.getUnitOfWork().beginTransactedBy("jta"); + super.process(exchange, callback); + exchange.getUnitOfWork().endTransactedBy("jta"); + } else { + super.process(exchange, callback); + } + return false; Review comment: This may be an existing "issue" as the returned value should be the output from super.process and not hardcoded to false ########## File path: components/camel-jta/src/main/java/org/apache/camel/jta/JtaTransactionErrorHandler.java ########## @@ -64,4 +69,16 @@ public ErrorHandler clone(Processor output) { return answer; } + @Override + public boolean process(final Exchange exchange, final AsyncCallback callback) { + if (!exchange.isTransacted()) { + LOG.debug("mark " + exchange + " transacted"); Review comment: Can you use logger placeholders: "Mark {} as transacted", exchange -- 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