You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jerry Williamson (JIRA)" <ji...@apache.org> on 2016/04/19 18:03:25 UTC

[jira] [Updated] (CAMEL-9887) onCompletion not called on Splitter configured with CompletionAwareAggregationStrategy and shareUnitOfWork=true

     [ https://issues.apache.org/jira/browse/CAMEL-9887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Williamson updated CAMEL-9887:
------------------------------------
    Description: 
In 2.17.0, if a Splitter is configured with shareUnitOfWork=true, then its AggregationStrategy is now wrapped by a ShareUnitOfWorkAggregationStrategy. This causes the following code from *MulticastProcessor.doDone()* to fail to invoke onCompletion when the configured strategy implements CompletionAwareAggregationStrategy.

{noformat}
if (strategy instanceof CompletionAwareAggregationStrategy) {
            ((CompletionAwareAggregationStrategy) strategy).onCompletion(subExchange);
}
{noformat}

It appears the change was a part of CAMEL-9573.

I haven't completely analyzed the shared unit of work changes but one possible approach to fix this would be to have the ShareUnitOfWorkAggregationStrategy implement CompletionAwareAggregationStrategy and then have its onCompletionMethod delegate to the wrapped strategy iff it also implements CompletionAwareAggregationStrategy.


  was:
In 2.17.0, if a Splitter is configured with shareUnitOfWork=true, then its AggregationStrategy is now wrapped by a ShareUnitOfWorkAggregationStrategy. This causes the following code from *MulticastProcessor.doDone()* to fail to invoke onCompletion when the configured strategy implements CompletionAwareAggregationStrategy.

{noformat}
if (strategy instanceof CompletionAwareAggregationStrategy) \{
            ((CompletionAwareAggregationStrategy) strategy).onCompletion(subExchange);
\}
{noformat}

It appears the change was a part of CAMEL-9573.

I haven't completely analyzed the shared unit of work changes but one possible approach to fix this would be to have the ShareUnitOfWorkAggregationStrategy implement CompletionAwareAggregationStrategy and then have its onCompletionMethod delegate to the wrapped strategy iff it also implements CompletionAwareAggregationStrategy.



> onCompletion not called on Splitter configured with CompletionAwareAggregationStrategy and shareUnitOfWork=true
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-9887
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9887
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.17.0
>            Reporter: Jerry Williamson
>
> In 2.17.0, if a Splitter is configured with shareUnitOfWork=true, then its AggregationStrategy is now wrapped by a ShareUnitOfWorkAggregationStrategy. This causes the following code from *MulticastProcessor.doDone()* to fail to invoke onCompletion when the configured strategy implements CompletionAwareAggregationStrategy.
> {noformat}
> if (strategy instanceof CompletionAwareAggregationStrategy) {
>             ((CompletionAwareAggregationStrategy) strategy).onCompletion(subExchange);
> }
> {noformat}
> It appears the change was a part of CAMEL-9573.
> I haven't completely analyzed the shared unit of work changes but one possible approach to fix this would be to have the ShareUnitOfWorkAggregationStrategy implement CompletionAwareAggregationStrategy and then have its onCompletionMethod delegate to the wrapped strategy iff it also implements CompletionAwareAggregationStrategy.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)