camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filippo Balicchia <fbalicc...@gmail.com>
Subject Re: create a transacted policy with camel
Date Tue, 17 Jan 2012 06:46:20 GMT
Sorry surely

from("jms:myqueue").transacted("PROPAGATION_REQUIRED").id("DestRoute").throwException(new
Exception("persistence error"))

In spring file definition

<bean id="PROPAGATION_REQUIRED"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
		<property name="transactionManager">
			<osgi:reference
				interface="org.springframework.transaction.PlatformTransactionManager" />
		</property>
			<property name="propagationBehaviorName" value="PROPAGATION_REQUIRED" />
</bean>



Il 17 gennaio 2012 07:31, Claus Ibsen <claus.ibsen@gmail.com> ha scritto:
> On Tue, Jan 17, 2012 at 7:24 AM, Filippo Balicchia <fbalicchia@gmail.com> wrote:
>> Thanks to all
>> I have resolved
>>
>
> Do you mind sharing your solution?
> So others who have a similar issue, can read your solution.
>
>
>> Il 16 gennaio 2012 19:11, Filippo Balicchia <fbalicchia@gmail.com> ha scritto:
>>> Hello i try to use transaction from camel in osgi bundle.
>>>
>>> My route look like this
>>>
>>> from("jms:myqueue").transacted().id("DestRoute").throwException(new
>>> Exception("persistence error"))
>>> And i my configuration look like this:
>>>
>>> <bean id="activemq"
>>> class="org.apache.activemq.camel.component.ActiveMQComponent">
>>>        <property name="connectionFactory">
>>>                        <osgi:reference interface="javax.jms.ConnectionFactory"
/>
>>>        </property>
>>>        <property name="transacted" value="true" />
>>>        <property name="transactionManager">
>>>                <osgi:reference
>>>                        interface="org.springframework.transaction.PlatformTransactionManager"
/>
>>>        </property>
>>> </bean>
>>>
>>> <camelContext xmlns="http://camel.apache.org/schema/spring">
>>>                <routeBuilder ref="destRoute" />
>>> </camelContext>
>>>
>>> At bundle startup it tell me that that doesn't find camel-spring
>>> 'Cannot create a transacted policy as camel-spring.jar is not on the classpath'
>>> It 'very clear but in my header package
>>> org.springframework.transaction
>>> org.apache.camel.spring
>>> are present.
>>>
>>> Where am I mistaken or forgotten, or what?
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message