-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jose,

On 10/11/12 3:31 PM, Jose María Zaragoza wrote:
>> How can you tell the difference between a primary server being
>> "down" and the primary server needing to (otherwise?) fail-over
>> to the backup? I'm confused about your nomenclature (primary
>> failover means mirror -> primary?).
> 
> Well, I'm newbie in SQLServer but I think that  primary and mirror
> are sending message to each other ( mirroring session ) When
> primary fails, mirror becomes the primary
> 
> About SQLServer documentation, when a connection is established to
> a primary server (which is on a mirroring session) , is returned to
> it the configuration of the mirror ( who is the primary, who is
> the mirror ). So, if there is a fail when you are using that
> connection, a SQLException is thrown . About the SQLServer  , you
> must close that connection and get a new one. In theory, this new
> connections knows what is the right server to connect ( driver
> knows it )
> 
> So, this is my question: what does happen with connections living
> at pool ?

It sounds like just with any other database: if you enable a
validationQuery then failover (or any kind) will be transparent to the
application: DBCP will test the connection, if failover occurs a
SQLException if thrown, DBCP catches that exception, closes the
connection, and creates a new one. The driver should know about the
failover and connect to the secondary server and return a fresh
Connection, which gets returned to the application. I don't know how
many times DBCP will repeat this for a single getConnection call.

The pool will slowly turn-over as the application requests (now
invalid) connections and each of them will be refreshed as needed.

>> AFAIK, DBCP knows nothing about failover: all that stuff happens
>> at the JDBC driver-level.
> 
> I agree with you. Because of that,  I've got that question :-)

Hopefully I've answered it..?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlB4KFIACgkQ9CaO5/Lv0PCoJwCdGug2+jVGrKS+xn+mEQxvj1JT
Me4AoK2UcvPgN2HUDaUpXkhgPpC1vKVW
=HlLC
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to