Hi,
Good thread and it helped, but I too, still have unsafe Transaction
Management in my Camel Consumer Route. As mentioned the
TransactionInterceptor.process() method is called by the DeadLetterChannel
processing. Thus, the message gets committed off the Queue before it can be
safely deposited elsewhere (or rolled back). Any idea on how to have the
DeadLetterChannel.process() called by TransactionInterceptor.process()
instead of the other way around?
Just put a breakpoint in the TransactionInterceptor.process(), look at the
stack trace and you'll see what I mean.
I'm still going to place the message on my Error Route, which is to the file
system, but if the Power goes at just the wrong time, I'll lose a message
for sure.
Thanks,
Tom
public void process(final Exchange exchange) {
LOG.info("transaction begin");
transactionTemplate.execute(new TransactionCallbackWithoutResult() {
protected void doInTransactionWithoutResult(TransactionStatus
status) {
try {
processNext(exchange);
} catch (Exception e) {
throw new RuntimeCamelException(e);
}
}
});
LOG.info("transaction commit");
}
--
View this message in context:
http://www.nabble.com/JMS-Transactions---How-To-tp15168958s22882p17200722.html
Sent from the Camel - Users mailing list archive at Nabble.com.