[
https://issues.apache.org/activemq/browse/CAMEL-3121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61816#action_61816
]
Simon commented on CAMEL-3121:
------------------------------
The following post contains 2 problems :
Issue 1:
Cannot rename the file exception. It was found and fixed there:
https://issues.apache.org/activemq/browse/CAMEL-2897
But the problem only fix when streaming is used. If streaming isn't used...
the problem persist.
Quick patch:
Splitter.java
private Iterable<ProcessorExchangePair> createProcessorExchangePairsList(
Exchange exchange, Object value) {
List<ProcessorExchangePair> result;
Integer collectionSize = CollectionHelper.size(value);
if (collectionSize != null) {
result = new
ArrayList<ProcessorExchangePair>(collectionSize);
} else {
result = new ArrayList<ProcessorExchangePair>();
}
Iterable<ProcessorExchangePair>
createProcessorExchangePairsIterable = createProcessorExchangePairsIterable(
exchange, value);
Iterator<ProcessorExchangePair> iterator =
createProcessorExchangePairsIterable
.iterator();
while (iterator.hasNext()) {
ProcessorExchangePair next = iterator.next();
result.add(next);
}
return result;
}
Issue 2:
We found a problem of shutdown in the patch we submitted. Now we do not create
a DefaultUNitOfWork we only set it at null.
Quick patch:
public Object next() {
Object part = iterator.next();
Exchange newExchange = exchange.copy();
if (iterator.hasNext()) {
newExchange.setUnitOfWork(null);
} if (part instanceof Message) {
newExchange.setIn((Message) part);
} else {
Message in =
newExchange.getIn();
in.setBody(part);
}
return
createProcessorExchangePair(index++,
getProcessors().iterator().next(), newExchange);
}
> Splitter EIP - The sub exchanges should not contains on completions from
> original Exchange
> ------------------------------------------------------------------------------------------
>
> Key: CAMEL-3121
> URL: https://issues.apache.org/activemq/browse/CAMEL-3121
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.4.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.5.0
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Camel-calling-commit-too-early-when-using-split-seda-file-endpoint-tp2830894p2830894.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.