activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsimmonsc <jsimmo...@gmail.com>
Subject Re: XaPooledConnectionFactory
Date Wed, 07 Nov 2012 12:21:51 GMT
My entire context is below.  

If I switch out the org.apache.activemq.pool.XaPooledConnectionFactory with
a org.fusesource.jms.pool.XaPooledConnectionFactory, everything works as
expected except for the previously mentioned memory leak fixed in AMQ-3997.


Just in case it's needed, my route:

from("activemq:josh.test.queue")
			.transacted()
			.to("activemq:josh.test.queue2")
			.process(new Processor() {
				public void process(Exchange arg0) throws Exception {
					Thread.sleep(5000);
				}
			})
			.rollback();
My context:


  	<camel:camelContext xmlns="http://camel.apache.org/schema/spring">
		<package>josh.test</package>
	</camel:camelContext>

	<ctx:property-placeholder
location="file:${user.home}/ApplicationData/amq.properties" />

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

	<bean id="activeMQConnectionFactory"
class="org.apache.activemq.ActiveMQXAConnectionFactory">
    	    <property name="brokerURL" value="${amqBrokerURL}"/>
            <property name="userName" value="${amqUsername}"/>
             <property name="password" value="${amqPassword}"/>
	</bean>
	
	<bean id="activeMQPooledConnection"
class="org.apache.activemq.pool.XaPooledConnectionFactory"
init-method="start" destroy-method="stop"> 
        <property name="maxConnections" value="1" /> 
        <property name="connectionFactory" ref="activeMQConnectionFactory"
/>
        <property name="transactionManager" ref="osgiJtaTransactionManager"
/>
    </bean> 
    
    <bean id="activeMQConfig"
class="org.apache.camel.component.jms.JmsConfiguration"> 
        <property name="connectionFactory" ref="activeMQPooledConnection"/> 
        <property name="transactionManager"
ref="osgiPlatformTransactionManager"/> 
        <property name="transacted" value="false"/>
    </bean>      	
    
	<bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
	    <property name="configuration" ref="activeMQConfig" />
	</bean>




--
View this message in context: http://activemq.2283324.n4.nabble.com/XaPooledConnectionFactory-tp4658865p4658913.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message