L.S., If you're using the servicemix-camel JBI component shipped with ServiceMix, you shouldn't have to deal with setting the DONE status yourself - the component should handle that for you as soon as the route ends. Could you try removing all the proprietary code from the camel route and just keeping the bare essentials around for us to reproduce the issue?
Regards, Gert Vanthienen ------------------------ FuseSource Web: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ On Tue, Jun 14, 2011 at 3:04 PM, Atit <[email protected]> wrote: > Hi Gert, > > Thanks for analyzing the log file. > I did read this else where about having to set the status on the exchange > object as either DONE or ERROR. The endpoint > ({http://myapplication}messageRouter) is custom coded camel route. > Unfortunately i will not be able to share the code, but we have built it > using http://servicemix.apache.org/order-file-processing.html this example > . > > Where do we set the status code? Should i be setting the status in the > sender class in the custom write marshaller or in the processor? I will also > need to write this in my error handler class? > > Is this the right way to set the status: > > > import javax.annotation.Resource; > import javax.jbi.messaging.DeliveryChannel; > import javax.jbi.messaging.ExchangeStatus; > import javax.jbi.messaging.InOnly; > > public class MyClass implements Processor { > > @Resource > private DeliveryChannel channel; > > public void process(final Exchange exchange) throws Exception { > > //my application code > > InOnly exchangeMsg = > channel.createExchangeFactory().createInOnlyExchange(); > exchangeMsg.setStatus(ExchangeStatus.DONE); > channel.send(exchangeMsg); > } > } > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/SMXCOMP-594-persists-in-2009-02-tp4483715p4487741.html > Sent from the ServiceMix - Dev mailing list archive at Nabble.com. >
