> Is there a sample implementation or documentation on handling all the
> robustness issues associated with routers being restarted, not being
> present, etc. I am currently implementing some long running clients and
> all
> the samples I have seen are (necessarily) light on dealing with
> robustness.
> My setup is using Topic-based publish/subscribe to a single router and
> it
> does all the TopicConnectionFactory, TopicConnection, TopicSession,
> Topic
> name lookup, etc on startup. If the router is restarted or is not
> running
> it currently blows up. Obviously you can't do all this each time a
> message
> is sent, the overhead is too high, so I am looking for pointers as to
> the
> best way of dealing with these issues.
There is no such sample. To implement a reconnect is quite simple. Use a
timer which does a connect if the actual state is 'disconnected' (store
some boolean for this). Register an exception listener on the connection
which switches the flag to false. On next interval, the timer does a
connect and switches the flag to true.
On reconnect you don't have to JNDI lookup the administered objects again;
you can re-use it.
--
Andreas Mueller, [EMAIL PROTECTED], IIT GmbH, Bremen/Germany, http://www.iit.de
SwiftMQ, JMS Enterprise Messaging System, http://www.swiftmq.com
------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/developers@mail.iit.de/