Given following blueprint and camel context:
<blueprint...>
        <reference id="txManagerRef" 
                
interface="org.springframework.transaction.PlatformTransactionManager" />

        <bean id="PROPAGATION_REQUIRED"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
                <property name="transactionManager" ref="txManagerRef" />
        </bean>
<camelContext>
                <route id="jmsConsumer">
                        <from uri="amq://myqueue" />
                        <transacted ref="PROPAGATION_REQUIRED" />
                        <to uri="mock:debug" />
                </route>
</camelContext>
</blueprint>

amq: and PlatformTransactionManager are available in Fuse, the route works
as expected.

How can I set up an amq: component and a transaction manager in a Junit to
test the same route?

I tried following without success:
* add transaction manager as a service and an amq bean in an additional
test-blueprint.xml (maybe deadlock due to service and reference in same
bundle) 
* Tried to override addServicesOnStartup(...) (adding amq as a service does
not work)


Any help would be appreciated.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Howto-use-amq-and-transacted-in-Fuse-and-Unit-Test-tp5767957.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to