The configuration you are using will only try 2 times to reconnect -
then it will fail with an exception.
If you want it to spend longer reconnecting consider increasing the value of
maxReconnectAttempts=2
On 8/7/06, Matthew Xie <[EMAIL PROTECTED]> wrote:
I use spring JmsTemplate to send jms message to AcitveMQ server. but i found
a problem that if amq server is not avaible, it will throw exception while
reconnect timeout.
here's my spring xml configurations:
<bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<!--
;jms.useAsyncSend=true -->
<property name="brokerURL"
value="failover:(tcp://ip1:61616,tcp://ip2:61616)?randomize=false;initialReconnectDelay=100;maxReconnectAttempts=2;maxReconnectDelay=1000;soTimeout=1000"/>
</bean>
</property>
</bean>
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<ref local="jmsFactory"/>
</property>
</bean>
is there any mistakes ?
could someone do me a favor? Thx!
Matt.
--
View this message in context:
http://www.nabble.com/dose-failover-have-a-timeout-setting--tf2061946.html#a5680259
Sent from the ActiveMQ - User forum at Nabble.com.
--
James
-------
http://radio.weblogs.com/0112098/