Search in sources :

Example 1 with ShareUnitOfWorkAggregationStrategy

use of org.apache.camel.processor.aggregate.ShareUnitOfWorkAggregationStrategy in project camel by apache.

the class Splitter method process.

@Override
public boolean process(Exchange exchange, final AsyncCallback callback) {
    final AggregationStrategy strategy = getAggregationStrategy();
    // to ensure it supports async routing
    if (strategy == null) {
        AggregationStrategy original = new UseOriginalAggregationStrategy(exchange, true);
        if (isShareUnitOfWork()) {
            original = new ShareUnitOfWorkAggregationStrategy(original);
        }
        setAggregationStrategyOnExchange(exchange, original);
    }
    return super.process(exchange, callback);
}
Also used : UseOriginalAggregationStrategy(org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy) ShareUnitOfWorkAggregationStrategy(org.apache.camel.processor.aggregate.ShareUnitOfWorkAggregationStrategy) UseOriginalAggregationStrategy(org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy) ShareUnitOfWorkAggregationStrategy(org.apache.camel.processor.aggregate.ShareUnitOfWorkAggregationStrategy) AggregationStrategy(org.apache.camel.processor.aggregate.AggregationStrategy)

Aggregations

AggregationStrategy (org.apache.camel.processor.aggregate.AggregationStrategy)1 ShareUnitOfWorkAggregationStrategy (org.apache.camel.processor.aggregate.ShareUnitOfWorkAggregationStrategy)1 UseOriginalAggregationStrategy (org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy)1