On 5/9/06, kitplummer <kitplummer@gmail.com> wrote:
> James.Strachan wrote:
> >
> > On 5/8/06, kitplummer <kitplummer@gmail.com> wrote:
> >>
> >> Is there a good strategy for checking to see if the Broker is up, from
> >> the
> >> client side? I need to keep trying to connect until a connection is
> >> made...
> >
> > How about letting ActiveMQ do that for you?
> >
> > http://activemq.org/How+do+I+configure+automatic+reconnection
> >
> > you can also register a transport listener to listen for the
> > connection state if you really want to do stuff manually yourself
> >
> > http://activemq.codehaus.org/maven/apidocs/org/apache/activemq/ActiveMQConnection.html#addTransportListener(org.apache.activemq.transport.TransportListener)
> >
>
> I tried the automatic reconnection thing...but, it didn't seem to work if
> the Broker wasn't available for the initial connection.
In what way didn't it work? Did it 'hang' is that what you mean? We
can't connect to a non-existing broker, so all we can do is to keep
trying to connect. What else could you do?
--
James
-------
http://radio.weblogs.com/0112098/
|