Hi

You should view this as 2 transactions. The 1st is for messages
flowing into the aggregator.
The 2nd transactions if for message flowing out of the aggregator.

The Spring TX manager does not support spanning transaction in
multiple threads. It has to be done in the same thread.

Then you can use the persistent support of the transaction to safely
store the messages.

Chapter 9 in the Camel in Action book covers transactions, and the
persistence support
of the aggregator.

You can also find details of information on the Camel web site.


On Tue, Dec 27, 2011 at 3:18 PM, dbmeikap <[email protected]> wrote:
> In my project i am converting one message format to another. My route builder
> contains following pseudo code -
> from("source end point")
>  .policy(PROPAGATION_REQUIRED)
>  .processRef("inMessageDBWriter") //Write input message to Database
>  .processRef("processor1")
>  .processRef("processor2")
>  .aggregate(My custom strategy)
>  .constant(true)
>  .completionSize(5)
>  .completionInterval(10000L)
>  .processRef("outMessageDBWriter") //Write output message to Database
>  .to("destination end point");
>
> Currently i am facing a problem at "outMessageDBWriter" processor, saying
> that Transaction is required. I have seen that after aggregation next steps
> run in a different thread. So already opened Transaction is not propagate to
> the new thread.
>
> How can i resolve this problem?
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Open-Transaction-is-not-working-after-aggregation-strategy-applying-tp5103177p5103177.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
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