Thank you

Claus Ibsen-2 wrote:
> 
> Its all or nothing in 1.x
> 
> If using transaction = no onExcption, no Camel error handling etc.
> 
> 
> On Thu, Apr 29, 2010 at 4:08 PM, gnanda
> <[email protected]> wrote:
>>
>> Thanks Claus. Could you please suggest on my second question please
>>
>>
>> "  From my observation if I add policy to my route , it ignores my
>>  onException() clause
>>  from("jmstx:queue:spq2").policy(required)
>>                        .bean(myBean,"setLocationUrI")
>>  And if I take policy  out from the route seems like exception block is
>> in
>>  effect.
>>
>>  If I do not use policy to the route is it  staill transactional?
>> "
>>
>>
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> Hi
>>>
>>>
>>> On Wed, Apr 28, 2010 at 8:21 PM, gnanda
>>> <[email protected]> wrote:
>>>>
>>>> Hi all ,
>>>> I am using camel 1.6 as router in my messge flow and i have transaction
>>>> defined  as below.
>>>>
>>>> If I use my jmscomponent as trnsaction, could i still use onEXception()
>>>> clause to retry locally before retry bt the transaction manager
>>>
>>> No this is not possible in Camel 1.x. You need Camel 2.x for that.
>>>
>>>
>>>>  From my observation if I add policy to my route , it ignores my
>>>> onException() clause
>>>> from("jmstx:queue:spq2").policy(required)
>>>>                        .bean(myBean,"setLocationUrI")
>>>> And if I take policy  out from the route seems like exception block is
>>>> in
>>>> effect.
>>>>
>>>> If I do not use policy to the route is it  staill transactional?
>>>>
>>>>
>>>> <bean id="jmstx" class="org.apache.camel.component.jms.JmsComponent">
>>>> <property name="configuration" ref="jmsConfig" />
>>>> </bean>
>>>> <bean id="jmsConfig"
>>>> class="org.apache.camel.component.jms.JmsConfiguration">
>>>> <property name="connectionFactory" ref="jmsConnectionFactory"/>
>>>>  <!-- <property name="concurrentConsumers" value="5" />-->
>>>>
>>>> <property name="transactionManager" ref="jmsTransactionManager"/>
>>>> <property name="transacted" value="true"/>
>>>> </bean>
>>>>
>>>> <bean id="PROPAGATION_REQUIRED"
>>>> class="org.apache.camel.spring.spi.SpringTransactionPolicy">
>>>>    <property name="transactionManager" ref="jmsTransactionManager"/>
>>>>    <property name="propagationBehaviorName"
>>>> value="PROPAGATION_REQUIRED"/>
>>>>
>>>>  </bean>
>>>>
>>>> <!-- the transactional error handler
>>>> <bean id="errorHandler"
>>>> class="org.apache.camel.spring.spi.TransactionErrorHandlerBuilder">
>>>>    <property name="springTransactionPolicy"
>>>> ref="PROPAGATION_REQUIRED"/>
>>>> </bean>
>>>> -->
>>>>
>>>> <bean id="jmsConnectionFactory"
>>>> class="org.apache.activemq.ActiveMQConnectionFactory">
>>>> <property name="brokerURL" value="tcp://localhost:61616"/>
>>>> <property name="redeliveryPolicy" ref="redeliveryPolicy" />
>>>> </bean>
>>>>
>>>> <bean id="redeliveryPolicy"
>>>> class="org.apache.activemq.RedeliveryPolicy">
>>>> <property name="maximumRedeliveries" value="1"/>
>>>> </bean>
>>>>
>>>> <!--
>>>> <bean id="jmsConnectionFactory"
>>>>    class="org.jencks.amqpool.XaPooledConnectionFactory">
>>>>
>>>>    <constructor-arg index="0" type="java.lang.String"
>>>>        value="tcp://localhost:61616" />
>>>>    <property name="maxConnections" value="10" />
>>>>  </bean>
>>>> -->
>>>> <bean id="jmsTransactionManager"
>>>> class="org.springframework.jms.connection.JmsTransactionManager">
>>>> <property name="connectionFactory" ref="jmsConnectionFactory" />
>>>> </bean>
>>>> <!--
>>>> <bean id="jmsConnectionFactory"
>>>> class="org.apache.activemq.ActiveMQConnectionFactory">
>>>> <property name="brokerURL" value="tcp://localhost:61616"/>
>>>> </bean>
>>>>
>>>> -->
>>>>
>>>>  <bean id="routerBean" class="com.pf.camelconsumer.MyRouterBuilder">
>>>>  </bean>
>>>>
>>>>  <camelContext id="camel"
>>>> xmlns="http://activemq.apache.org/camel/schema/spring"; trace="true">
>>>>    <routeBuilderRef ref="routerBean"/>
>>>>  </camelContext>
>>>>
>>>> </beans>
>>>>
>>>>
>>>> Another related to camel transaction is, when I am undeploying my
>>>> service
>>>> assembly, I am getting the following exception. Not sure what is the
>>>> cause
>>>> of this.
>>>> 2010-04-28 14:13:46,570 | 14:13:46,570 | ERROR | //127.0.0.1:1802 |
>>>> Service
>>>> | ivemq.broker.TransportConnection  290 | Async error occurred:
>>>> javax.jms.JMSException: Transaction
>>>> 'TX:ID:LPF004689-1801-1272475381000-0:0:2' has not been started.
>>>> javax.jms.JMSException: Transaction
>>>> 'TX:ID:LPF004689-1801-1272475381000-0:0:2' has not been started.
>>>>        at
>>>> org.apache.activemq.broker.TransactionBroker.getTransaction(TransactionBroker.java:270)
>>>>        at
>>>> org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:190)
>>>>        at
>>>> org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
>>>>        at
>>>> org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
>>>>        at
>>>> org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85)
>>>>        at
>>>> org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:456)
>>>>        at
>>>> org.apache.activemq.command.MessageAck.visit(MessageAck.java:205)
>>>>        at
>>>> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305)
>>>>        at
>>>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
>>>>        at
>>>> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
>>>>        at
>>>> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
>>>>        at
>>>> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
>>>>        at
>>>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
>>>>        at
>>>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203)
>>>>        at
>>>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
>>>>        at java.lang.Thread.run(Thread.java:619)
>>>>
>>>>
>>>> Please suggest
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/exception-handling-in-camel-transactional-route-tp28392323p28392323.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/exception-handling-in-camel-transactional-route-tp28392323p28401032.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/exception-handling-in-camel-transactional-route-tp28392323p28401374.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to