You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Charles Moulliard <cm...@gmail.com> on 2011/03/29 09:35:21 UTC
ErrorHandler - SMX4 - OSGI Service - TransactionManager
Hi,
I have deploy a camel transactional camel route on ServiceMix and
would like to define the onRedeliveryPolicy of the ErrorHandler of
Camel
I have setup in spring xml file the errorHandler like that
<errorHandler id="txErrorHandler"
type="TransactionErrorHandler" transactionManagerRef="txManager">
<redeliveryPolicy maximumRedeliveries="0"/>
</errorHandler>
Question : As the Transaction Manager is setup on ServiceMix4 and
referenced using OSGI Service, How can we pass this parameter in the
errorHandler of Camel ?
Regards,
Charles Moulliard
Sr. Principal Solution Architect - FuseSource
Apache Committer
Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard
Re: ErrorHandler - SMX4 - OSGI Service - TransactionManager
Posted by Charles Moulliard <cm...@gmail.com>.
This property is defined here :
<!-- Transaction POLICY used by Camel Transactional Route
We refer to the ServiceMiX TxManager -->
<bean id="PROPAGATION_REQUIRED"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
<property name="transactionManager">
<osgi:reference
interface="org.springframework.transaction.PlatformTransactionManager"/>
</property>
</bean>
Is it enough ?
On Tue, Mar 29, 2011 at 10:14 AM, Willem Jiang <wi...@gmail.com> wrote:
> Hi Charles,
>
> You can use the id with the reference element, and camel will lookup the
> reference from the application context just like you defined a bean
> instance.
>
> <reference id="txManager"
> interface="org.springframework.transaction.PlatformTransactionManager"/>
>
> Willem
>
>
> On 3/29/11 3:35 PM, Charles Moulliard wrote:
>>
>> Hi,
>>
>> I have deploy a camel transactional camel route on ServiceMix and
>> would like to define the onRedeliveryPolicy of the ErrorHandler of
>> Camel
>>
>> I have setup in spring xml file the errorHandler like that
>>
>> <errorHandler id="txErrorHandler"
>> type="TransactionErrorHandler" transactionManagerRef="txManager">
>> <redeliveryPolicy maximumRedeliveries="0"/>
>> </errorHandler>
>>
>> Question : As the Transaction Manager is setup on ServiceMix4 and
>> referenced using OSGI Service, How can we pass this parameter in the
>> errorHandler of Camel ?
>>
>> Regards,
>>
>> Charles Moulliard
>>
>> Sr. Principal Solution Architect - FuseSource
>> Apache Committer
>>
>> Blog : http://cmoulliard.blogspot.com
>> Twitter : http://twitter.com/cmoulliard
>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>> Skype: cmoulliard
>>
>
>
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
>
Re: ErrorHandler - SMX4 - OSGI Service - TransactionManager
Posted by Willem Jiang <wi...@gmail.com>.
Hi Charles,
You can use the id with the reference element, and camel will lookup the
reference from the application context just like you defined a bean
instance.
<reference id="txManager"
interface="org.springframework.transaction.PlatformTransactionManager"/>
Willem
On 3/29/11 3:35 PM, Charles Moulliard wrote:
> Hi,
>
> I have deploy a camel transactional camel route on ServiceMix and
> would like to define the onRedeliveryPolicy of the ErrorHandler of
> Camel
>
> I have setup in spring xml file the errorHandler like that
>
> <errorHandler id="txErrorHandler"
> type="TransactionErrorHandler" transactionManagerRef="txManager">
> <redeliveryPolicy maximumRedeliveries="0"/>
> </errorHandler>
>
> Question : As the Transaction Manager is setup on ServiceMix4 and
> referenced using OSGI Service, How can we pass this parameter in the
> errorHandler of Camel ?
>
> Regards,
>
> Charles Moulliard
>
> Sr. Principal Solution Architect - FuseSource
> Apache Committer
>
> Blog : http://cmoulliard.blogspot.com
> Twitter : http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard
> Skype: cmoulliard
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang