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.ib...@gmail.com> ha scritto:
> On Tue, Jan 17, 2012 at 7:24 AM, Filippo Balicchia <fbalicc...@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 <fbalicc...@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: cib...@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to