On Fri, Dec 30, 2011 at 4:25 PM, jmh <jeanmarc.her...@nrb.be> wrote:
> Hello,
>
>
> I don't want to lose any message if my application crashes during an
> aggregation so I add an aggregationRepository in my JMS transaction...
> Can the aggregationRepositoryRef join the JMS transaction in this following
> route ?

Yes, the JMS transaction will only commit if the exchange could be
successfully processed (eg no exceptions is thrown).
So if the code that stores the exchange in the aggregation repository
do not throw an exception, then the TX is okay.

However as said before, the outgoing messages from the aggregator, do
*not* participate in the JMS transaction (eg from the input side).

The Camel in Action book covers in depth this use-case.


>
> from("activemq:file2doc.prepareReturnFile")
>                                .aggregate(header(GedConstants.SET_NAME),
>                                                fileAggregationStrategy)
>                                .aggregationRepositoryRef("gedLineRepo")
>                                .completionSize(header("returnFileCount"))
>                                .beanRef(BEAN_REF_FILE2DOC_CAMEL_FACADE, 
> "mergeInfo")
> .to("activemq:file2doc.return");
>
> Thanks for any suggestion
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/can-the-aggregationRepository-join-a-JMS-transaction-tp5110230p5110230.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to