Hi all,

We want to upgrade from ActiveMQ 5.5.1 to 5.8.0. We are using
CachingConnectionFactory, and when we do the upgrade, our integration tests
continue working perfect. 

Our configuration is:
<bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL" value="${activemq.brokerURL}"/>
    <property name="userName" value="${activemq.username}"/>
    <property name="password" value="${activemq.password}"/>
    <property name="exceptionListener" ref="jmsExceptionListener"/>
    <property name="transportListener" ref="jmsTransportListener"/>
    <property name="redeliveryPolicy" ref="redeliveryPolicy"/>
  </bean>

  <bean id="redeliveryPolicy" class="org.apache.activemq.RedeliveryPolicy">
    <property name="backOffMultiplier"
value="${activemq.backOffMultiplier}"/>
    <property name="collisionAvoidancePercent"
value="${activemq.collisionAvoidancePercent}"/>
    <property name="initialRedeliveryDelay"
value="${activemq.initialRedeliveryDelay}"/>
    <property name="maximumRedeliveries"
value="${activemq.maximumRedeliveries}"/>
    <property name="useCollisionAvoidance"
value="${activemq.useCollisionAvoidance}"/>
    <property name="maximumRedeliveryDelay"
value="${activemq.maximumRedeliveryDelay}"/>
    <property name="redeliveryDelay" value="${activemq.redeliveryDelay}"/>
    <property name="useExponentialBackOff"
value="${activemq.useExponentialBackOff}"/>
  </bean>

  <bean id="cachedConnectionFactory"
class="org.springframework.jms.connection.CachingConnectionFactory">
    <property name="targetConnectionFactory" ref="connectionFactory"/>
    <property name="sessionCacheSize" value="${activemq.maxConnections}"/>
    <property name="cacheConsumers" value="false"/>
  </bean>

We would like changing CachingConnectionFactory to PooledConnectionFactory
(what we were doing in the past with 5.5.1), but then, with 5.8.0 some of
our tests start to fail.

In the logs, we can see different problems like: The Session is closed, The
consumer is closed,...

javax.jms.IllegalStateException: The Session is closed
        at
org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:731)at
org.apache.activemq.ActiveMQSession.getTransacted(ActiveMQSession.java:521)
        at
org.apache.activemq.pool.PooledSession.getTransacted(PooledSession.java:259)

What we have done, it´s replacing the cachedConnectionFactory with this AMQ
connection factory:
<bean id="amqPooledConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start"
destroy-method="stop">
    <property name="maxConnections" value="${activemq.maxConnections}"/>
    <property name="connectionFactory" ref="ligConnectionFactory"/>
  </bean>

Anyone had also this problem? Are we writing the configuration wrong or
could be an AMQ problem? 

Thanks,
Ana



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-5-8-Caching-to-PooledConnectionFactory-replacement-problems-tp4665207.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to