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
>