[ https://issues.apache.org/activemq/browse/CAMEL-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-1475: ------------------------------- Attachment: JMS_lookup_TX_manager.patch I was working on letting the JMS component auto lookup the TX manager as well. Patch attached. However want to discuss it a bit more, eg what if the platform manager in Spring XML is not JMS based, eg a DataSource based = DataSourceTransactionManager. Then I assume the JMS component cannot work anyway. And the Spring PlatformTransactionManager does not support any operations to determine if it supports your resource type (JMS, JDBC, etc.). But it makes great sense when you have define a JTA TX manager. But of course you just need to define the transactionManager property on the ActiveMQComponent then you are good to go anyway. Such as: {code:xml} <!-- define our activemq component --> <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"> <property name="connectionFactory" ref="jmsConnectionFactory"/> <!-- define the jms consumer/producer as transacted --> <property name="transacted" value="true"/> <property name="transactionManager" ref="jmsTransactionManager"/> </bean> {code} So what we are talking about is being able to loose the last property <property name="transactionManager" ref="jmsTransactionManager"/> And have Camel auto lookup the TX manager. > Easier transacted configuration of routes > ----------------------------------------- > > Key: CAMEL-1475 > URL: https://issues.apache.org/activemq/browse/CAMEL-1475 > Project: Apache Camel > Issue Type: Bug > Components: camel-core, camel-spring > Affects Versions: 1.6.0 > Reporter: Claus Ibsen > Assignee: Claus Ibsen > Fix For: 2.0.0 > > Attachments: JMS_lookup_TX_manager.patch > > > See TransactionalClientWithRollbackTest in camel-spring > The {{.policy(required)}} is needed in the routes even though we have a > global transaction error handler with a default policy set: > {code} > errorHandler(transactionErrorHandler(required)); > {code} > So Camel should fallback and use the global policy if the route itself does > not have a policy defined. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.