470,848 Members | 972 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

JMS Broker Reconnect Issue.

I need to introduce a JMS reconnect feature into an existing application.
Basically, the application is a simple consumer of messages from a JMS
topic. My requirement is to have the application continue to consume
messages after the connected JMS service is restarted. I detect the failed
JMS service through the ExceptionListener callback. Once detected, I go into
a reconnect loop.

The reconnect loop attempts to make the JMS connections once every minute
until the JMS service is again available. Obviously, it will fail if the
service has not come back yet. That's not the problem. The problem is:

1. The JNDI lookups continually fail after the service is back. Note: I am
using a Sun One Appserver 7 with both the JNDI and JMS all in one. When I
say "service is back", I mean both the JNDI and the JMS service are up and

2. I do something like this:

context = new InitialContext();
factory = (TopicConnectionFactory) context.lookup("abc");

This works when the application first comes up, but fails when trying it
after the Appserver (JNDI/JMS) is restarted. Is there something lingering
that prevents these calls from working?

My question is: What is required to get this to work? Is this approach an
acceptable recovery solution? Thanks in advance for any help.

Jul 18 '05 #1
0 3650

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by lauren quantrell | last post: by
2 posts views Thread by dkode | last post: by
reply views Thread by geeknovice | last post: by
4 posts views Thread by Karch | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.