activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jydev <jyoony...@gmail.com>
Subject connection failover using ActiveMQ 5.2
Date Mon, 04 May 2009 19:24:55 GMT

Hello,
I am trying to set up auto-reconnect per 
http://activemq.apache.org/failover-transport-reference.html instruction 
failover:(tcp://primary:61616)?timeout=3000

But for some reason, I am  getting IllegalArgumentException when timeout
attribute is set.  

Caused by: javax.jms.JMSException: Could not create Transport. Reason:
java.lang.IllegalArgumentException: Invalid connect parameters:
{timeout=3000}
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
        at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:239)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:252)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:224)
        at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:172)
        at
org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:125)
        at
org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:110)
        at
org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:81)
        at
org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
        at
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:461)
        ... 6 more
Caused by: java.lang.IllegalArgumentException: Invalid connect parameters:
{timeout=3000}
        at
org.apache.activemq.transport.failover.FailoverTransportFactory.createTransport(FailoverTransportFactory.java:63)
        at
org.apache.activemq.transport.failover.FailoverTransportFactory.doConnect(FailoverTransportFactory.java:37)
        at
org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
        at
org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
        at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:237)
        ... 14 more


Here is the connection factory config in Spring config.
    <bean id="jmsRemoteConnectionFactory"
        class="org.apache.activemq.pool.PooledConnectionFactory"
destroy-method="stop">
         <property name="connectionFactory">
            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL"
value="failover:(tcp://${jms.broker.host}:61616)?timeout=3000"/>
            </bean>
         </property>
    </bean>

Any idea why it's not accepting "timeout" parameter?

http://activemq.apache.org/activemq-520-release.html 5.2 release note  says
"The default ActiveMQConnectionFactory brokerUrl now uses the failover
transport."  What does this mean?  Without "failover:(tcp...", dead
connections don't re-reconnect. 

Thank you so much in advance!
-- 
View this message in context: http://www.nabble.com/connection-failover-using-ActiveMQ-5.2-tp23374917p23374917.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message