It's look like the jms consumer never receive a done status from camel I don't know maybe it's a bug in servicemix-camel, which version do you use ?
You can try to add ?mep=in-only to force an in-only exchange jbi:endpoint: http://esb/jmsProviderErreursDLQ/jmsProviderErreursDLQ?mep=in-out see http://camel.apache.org/how-do-i-set-the-mep-when-interacting-with-jbi.html you can also maybe isolate your route with a camel seda from("jbi:...").to("seda:job"); from("seda:job").... Raphaël Delaporte wrote: > > Hi > > Thanks for explaination. > I've been running in other troubles... but this time, I run in a non > transacted routes. > > I've a JMS consumer which calls a Camel JBI endpoint, and if everything > goes > well, calls an other JMS provider to put the message in a queue (this > works > well). > In this Camel endpoint, I want to define an errorHandler which sends the > message to a DLQ for example. >>> errorHandler(deadLetterChannel("jbi:endpoint: > http://esb/jmsProviderErreursDLQ/jmsProviderErreursDLQ")); > > On errors, my custom error handler is called and I am able to find my > message in my DLQ (this works well) > But, my JMS consumer doesn't want to take anymore messages. It seems it's > freezed on the last exchange (and servicemix is freezed as well, cannot > shutdown, etc..) > > When I keep the default error handler, or if I set something like this, it > works. >>> errorHandler(deadLetterChannel("log:myClass")); > > Seems I've got trouble when I want to call other JBI endpoints into the > errorHandler. > > Any ideas of what's happen ? > > Thanks for your help. > Raphaël > > > 2010/1/17 tranchida <[email protected]> > >> >> The explanation of autoEnlistInTransaction and the different QOS >> depending >> on >> the flow can be found here -> >> http://servicemix.apache.org/transactions.html >> >> For my usage, I totaly disable jms and jca flow. I use only seda and >> pairs >> of jms consumer/provider for persistence / failover / load balancing. >> >> See ref : >> >> >> http://trenaman.blogspot.com/2008/11/jmsjca-flows-in-servicemix-wrong-level.html >> http://trenaman.blogspot.com/2009/03/new-jms-flow-in-servicemix-4.html >> >> >> >> Raphaël Delaporte wrote: >> > >> > Hi, >> > >> > Thanks for your replies. >> > >> > 1. I did not set the autoEnlistInTransaction="true" in servicemix.xml, >> but >> > I >> > don't understand for what this property is used for. I've just seen >> > "Retrieve the value for automatic transaction enlistment" but it's not >> > very >> > clear for me ... >> > -> OK it works with this property !! Very good ! >> > >> > >> > 2. Ok my MEP is InOnly because it comes from a jms consumer : >> > - but why have I the transaction rolledback if I specify non-existant >> > targetEndpoint / targetService for example ? Is it because the exchange >> is >> > still on the jms component side ? >> > - How can I specify an InOut MEP on the jms consumer ? >> > - the defaultMep property does not exist anymore on the new JMS >> > endpoints >> > - the synchronous property does not change the MEP >> > >> > >> > 3. Subsidiary question guys. >> > I've seen in the stacktrace when transaction is rolledback that the >> flow >> > used is the SEDA flow. I guess this flow is not persistant at all .. Am >> I >> > wrong ? >> > Is there a way to force this exchange to use other flow, as JMS flow >> for >> > instance ? >> > I commented out the SEDA flow in the servicemix.xml, and it uses the >> JMS >> > flow. But this is not really a good method... >> > >> > >> > Thanks a lot ! >> > Raphaël >> > >> > >> > >> > 2010/1/17 Jean-Baptiste Onofre <[email protected]> >> > >> >> Hi Raph, >> >> >> >> be careful, as your MEP is InOnly, in case of error, it can't go back >> to >> >> the JMS endpoint. >> >> >> >> Try to use InOut MEP, it should be better. >> >> >> >> Regards >> >> JB >> >> >> >> >> >> Raphaël Delaporte wrote: >> >> >> >>> Hi, >> >>> >> >>> I'm using SMX 3.3.1 with the JMS component 2009.01. >> >>> >> >>> I use the jms-consumer endpoint in the XA transacted mode. >> >>> This works, because if I want to test the transactionnal behaviour, I >> >>> specify some wrong service endpoint and my JMS message is rolledback >> to >> >>> the >> >>> queue. So that's OK. >> >>> >> >>> But my route calls the Camel JBI endpoint within the transaction. >> >>> If I throw any exception from a camel bean, the transaction is not >> >>> rolledback, and the JMS message is not redelivered into the queue. >> >>> It seems the transaction is commited. >> >>> >> >>> Here is my configuration : >> >>> >> >>> --- JMS SMX component ----- >> >>> <jms:consumer service="esb:jmsConsumerTrans" endpoint="jmsConsumer" >> >>> targetService="esb:CamelTrans" targetEndpoint="trans" >> >>> destinationName="queue/in" >> connectionFactory="#connectionFactory" >> >>> transacted="xa" /> >> >>> >> >>> >> >>> --- Camel route ----- >> >>> public void configure() throws Exception { >> >>> >> >>> errorHandler(noErrorHandler()); >> >>> >> >>> from("jbi:endpoint:http://esb/CamelTrans/trans") >> >>> .to(LOG) >> >>> .beanRef("routes", "erreur"); >> >>> >> >>> } >> >>> >> >>> public void erreur() throws Exception { >> >>> Thread.sleep(1000); >> >>> throw new Exception("erreur ..."); >> >>> } >> >>> >> >>> >> >>> >> >>> There is something strange to me (and this is why I guess this is a >> SMX >> >>> related and not Camel related). I've enabled the debug mode, and I >> can >> >>> see >> >>> the content of the messages. In the last exchange, I can see an error >> >>> field >> >>> with my exception (the one which comes from the Camel endpoint I >> guess) >> >>> >> >>> WARN - SimpleEndpoint - SimpleEndpoint.fail called: >> >>> DEBUG - DeliveryChannelImpl - Send >> >>> ID:192.168.0.3-12638f8f9d2-11:0 in DeliveryChannel{servicemix-camel} >> >>> DEBUG - SecuredBroker - send exchange with secure >> >>> broker >> >>> DEBUG - SedaFlow - Called Flow send >> >>> DEBUG - SedaQueue - >> >>> org.apache.servicemix.jbi.nmr.flow.seda.sedaqueu...@517bc3 dequeued >> >>> exchange: InOnly[ >> >>> id: ID:192.168.0.3-12638f8f9d2-11:0 >> >>> status: Error >> >>> role: consumer >> >>> service: {http://esb}CamelTrans >> >>> endpoint: trans >> >>> in: <?xml version="1.0" encoding="UTF-8"?><requete xmlns="http://esb >> "/> >> >>> error: java.lang.Exception: erreur ... >> >>> ] >> >>> DEBUG - DeliveryChannelImpl - Notifying exchange >> >>> ID:192.168.0.3-12638f8f9d2-11:0(1b9bbe8) in >> >>> DeliveryChannel{servicemix-jms} >> >>> from processInboundSynchronousExchange >> >>> DEBUG - DeliveryChannelImpl - Notified: >> >>> ID:192.168.0.3-12638f8f9d2-11:0(1b9bbe8) in >> >>> DeliveryChannel{servicemix-jms} >> >>> from sendSync >> >>> >> >>> >> >>> Thanks for your help ! >> >>> Raphaël >> >>> >> >>> >> >> -- >> >> Jean-Baptiste Onofré >> >> --------------------------------- >> >> HomePage >> >> http://www.nanthrax.net >> >> --------------------------------- >> >> Contacts >> >> [email protected] >> >> [email protected] >> >> --------------------------------- >> >> OpenSource >> >> BuildProcess/AutoDeploy >> >> http://buildprocess.sourceforge.net >> >> Apache ServiceMix >> >> http://servicemix.apache.org >> >> ----------------------------------- >> >> PGP : 17D4F086 >> >> >> > >> > >> >> -- >> View this message in context: >> http://old.nabble.com/Transaction-rollback-with-Camel-JBI-endpoint-tp27193847p27200109.html >> Sent from the ServiceMix - User mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://old.nabble.com/Transaction-rollback-with-Camel-JBI-endpoint-tp27193847p27200582.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
