[ 
https://issues.apache.org/jira/browse/CAMEL-17474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17492692#comment-17492692
 ] 

Jiri Ondrusek commented on CAMEL-17474:
---------------------------------------

[~zhfeng] I have a theory, what could be reason of this error. As you can see 
here: 
[https://github.com/apache/camel/blob/main/components/camel-jta/src/main/java/org/apache/camel/jta/TransactionErrorHandler.java#L91]
{code:java}
    @Override
    public void process(Exchange exchange) throws Exception {
        // we have to run this synchronously as a JTA Transaction does *not*
        // support using multiple threads to span a transaction
{code}
JtaTransactionErrorHandler has to be run synchronously. Unfortunately the 
change from 
[https://github.com/apache/camel/commit/961ad0e56e9331e71c386415ec67676e586ea629#diff-592328b1c35a306fa6ba3875f63b872de065e6d973ea89870d579bbab505cfadR214],
 which replaces "reactiveExecutor.scheduleSync(task);" with 
"reactiveExecutor.scheduleQueue(task);" changed synchronous executions to 
asynchronous. With that changed, jta/TransactionErrorHandler does not work 
correctly.

Quick fix is to revert back synchronous behavior, but I'm sure that it is not 
correct. Do you have an idea how this could be fixed?

 

At least this explains why spring transaction works (does not need synchronous 
executions)...

> camel-core: deadlock with multicast in a transacted context
> -----------------------------------------------------------
>
>                 Key: CAMEL-17474
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17474
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 3.13.0, 3.14.0
>            Reporter: Jeremy Ross
>            Assignee: Jiri Ondrusek
>            Priority: Major
>
> Using a multicast with more than one child in a transacted context causes a 
> deadlock. Reproducer here 
> https://github.com/jeremyross/camel-transacted-multicast.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to