A follow up for others.

It seems impossible to use the Activemq JCA adapter with ActivationSpecs pr.
destination in a convenient way. There is also some talk about this  here
<http://stackoverflow.com/questions/7390908/can-apache-camel-connect-to-an-activationspec-in-websphere>
  

Instead I gave up on the Resource Adapter, and set up XA support using plain
Spring Config.

Now I'm able to use XA and at the same time configure QOS pr. destination in
a more flexible way.


        <tx:jta-transaction-manager />
    

        <bean id="jmsTransactionManager"
class="javax.transaction.TransactionManager"
factory-bean="transactionManager" factory-method="getTransactionManager"/>
        
        <bean id="jmsXaConnectionFactory"
class="org.apache.activemq.ActiveMQXAConnectionFactory">
        <property name="brokerURL"
value="failover:(tcp://localhost:61616,tcp://localhost:61626)"/>
        <property name="redeliveryPolicy">
            <bean class="org.apache.activemq.RedeliveryPolicy">
                <property name="maximumRedeliveries" value="5"/>
            </bean>
        </property>
    </bean>
        
         <bean id="jmsTxConfig"
class="org.apache.camel.component.jms.JmsConfiguration"> 
        <property name="connectionFactory"
ref="pooledJmsXaConnectionFactory"/> 
        <property name="transactionManager" ref="transactionManager"/> 
        <property name="transacted" value="false"/>
        <property name="cacheLevelName" value="CACHE_CONNECTION"/>
    </bean> 
        
        <bean id="pooledJmsXaConnectionFactory"
class="org.apache.activemq.pool.XaPooledConnectionFactory">
        <property name="maxConnections" value="1" /> 
        <property name="connectionFactory" ref="jmsXaConnectionFactory" />
        <property name="transactionManager" ref="jmsTransactionManager"/>
    </bean>
     
    <bean id="resourceManager"
class="org.apache.activemq.pool.ActiveMQResourceManager"
init-method="recoverResource">
        <property name="transactionManager" ref="jmsTransactionManager" />
        <property name="connectionFactory" ref="jmsXaConnectionFactory" /> 
        <property name="resourceName" value="activemq.default" />
    </bean>
           
        <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
                <property name="configuration" ref="jmsTxConfig" />
        </bean>




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Setting-redelivery-properties-on-XaConnectionFactory-tp4679160p4679260.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to