activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <>
Subject Re: Is there JDBC master/slave retry logic if database goes down?
Date Wed, 11 Mar 2009 00:24:28 GMT
On Tue, Mar 10, 2009 at 4:40 PM, magellings <> wrote:
> Thanks for the response Bruce.  :)
> To my knowledge we aren't using a connection pooler.  We're just configuring
> the activemq xml and letting activeMQ do its thing.  One of my colleagues
> mentioned SNAC since we are using Sql Server, not sure if that is similar to
> a connection pooler or not.

The job of a JDBC connection pooler is to keep a pool of JDBC
connections available for use by a Java application. IIRC, SNAC stands
for SQL Native Client which has nothing to do with a JDBC connection

> In our scenario during a Sql Server failover it may take 15 minutes.  We
> aren't using a high availability cluster.  Does a connection pooler give the
> capability of dealing with this so that ActiveMQ doesn't shutdown?

One of the options in a good JDBC connection pooler is the ability to
test JDBC connections as it hands them out to the Java application. If
the connection is stale for any reason the JDBC connection pooler will
evict that connection from the pool and try the next one until it
reaches one that is alive. To my knowledge, some JDBC connection
poolers provide a the ability to configure some attributes like number
of retries, etc. E.g., here is some information about what c3p0

The one big caveat I will mention is that longer outage periods such
as the 15 minute outage you mention are not typically handled by a
JDBC connection pooler as they're mainly geared toward handling
momentary outages. As an example, notice that the default value for
acquireRetryDelay in c3p0 is only one second:

But you could certainly configure this to any value you want. I
encourage you to test this in your environment before deploying to

perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"

Apache ActiveMQ -
Apache Camel -
Apache ServiceMix -


View raw message