-
Oct 24th, 2008, 09:39 AM
#1
DMLC refresh connection issue
Hi,
I am using jms DefaultMessageListenerContainer.We would like to do exception handling especially when the jms server is down.
In order to do that I overrided refreshConnectionUntilSucessful() method.
After pre-defined attempts connecting back to server we want to notify the admin.
Every thing is good so far. But during testing, i purposely shutdown the jms server while my application is still running and the container is listening to the jms server. So, the DefaultMessageListenerContainer will invoke the refreshConnectionUntilSuccessful() method and keep trying to refresh the connection. Once i started the jms server, i expected that my DefaultListenerContainer is able to consume the message again from the jms server. But the actual fact is it NOT.
I dont understand this issue, am I missing any setting in container? or in client?
Any help is greatly appreciated.
Thanks
Vishhnu
W
-
Oct 24th, 2008, 12:00 PM
#2
I Got the problem, At the Client side connection was closed and it was throwing
rg.springframework.jms.IllegalStateException: Connection is closed; nested exception is javax.jms.IllegalStateException: Connection is closed
at org.springframework.jms.support.JmsUtils.convertJm sAccessException(JmsUtils.java:255)
I use SingleConnectionFactory , looks like connection is closed .I changed not use SingleConnectionFactory then it works like charm.
I want to use singleconnectionfactory for sure because it uses only one connection. I saw a resetConnection method there, how is works?
do I need to call manually?
Here is my config
bean id="jmsQueueConnectionFactory"
class="org.springframework.jms.connection.SingleCo nnectionFactory102">
<property name="targetConnectionFactory">
<ref bean="tibcoJMSConfiguration"/>
</property>
</bean>
how do i call reset connection? or is there any alternative
-
Oct 24th, 2008, 12:44 PM
#3
Never mind..I was using the SingleConnectionFactory at the client
it needs to set reconnectOnException to true inorder to reconnect again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules