JiriOndrusek opened a new pull request #7004:
URL: https://github.com/apache/camel/pull/7004


   Issue https://issues.apache.org/jira/browse/CAMEL-17474
   
   Problem is caused by the fact, that JTA transactions requires synchronous 
execution (see 
[comment](https://github.com/apache/camel/blob/main/components/camel-jta/src/main/java/org/apache/camel/jta/TransactionErrorHandler.java#L91))
   There is a 
[change](https://github.com/apache/camel/commit/961ad0e56e9331e71c386415ec67676e586ea629#diff-592328b1c35a306fa6ba3875f63b872de065e6d973ea89870d579bbab505cfadR214)
 (a few months ago), which changed default executions to be asynchronous and 
causes deadlocks.
   
   I added a test created by @zhfeng 
   
   The whole code change is only POC whether this kind of change would help. 
(it seems to be working successfully)
   Mainly I'm not sure about `JtaTransactionPolicy.beforeWrap`. But it is 
essential to set flag to the route's error handler factory, to make this idea 
work.
   
   I would appreciate any kind of help/review//response to this PR. (as I'm not 
even sure whether this is the right idea to implement)
   
   <!-- Uncomment and fill this section if your PR is not trivial
   - [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change 
(usually before you start working on it).  Trivial changes like typos do not 
require a JIRA issue.  Your pull request should address just this issue, 
without pulling in other changes.
   - [ ] Each commit in the pull request should have a meaningful subject line 
and body.
   - [ ] If you're unsure, you can format the pull request title like 
`[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` 
with the appropriate JIRA issue.
   - [ ] Write a pull request description that is detailed enough to understand 
what the pull request does, how, and why.
   - [ ] Run `mvn clean install -Psourcecheck` in your module with source check 
enabled to make sure basic checks pass and there are no checkstyle violations. 
A more thorough check will be performed on your pull request automatically.
   Below are the contribution guidelines:
   https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   -->
   


-- 
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]


Reply via email to