Fall-back not working?
Posted by: Uri Bernstein
Date: December 02, 2004 12:05PM

I'm using Connector/J 3.0.15 with JBoss 3.2 to connect to MySQL 4.1.7.
I'm trying to use the failover feature. When the primary DB goes down, the first query fails, and JBoss creates a new connection, which is correctly connecting to the secondary DB.
The problem is that when the primary DB goes back up, the connection never falls back to it - and continues to be connected to the secondary DB forever.

I'm pretty sure this used to work when I was using an older version of Connector/J (maybe 3.0.10).

Looking at the Connection.java code, I see that pingAndReconnect() [the only function which calls shouldFallBack()] is only called if needsPing is true. However, for a new connection created to the secondary DB (when the primary one is down), needsPing is never set.

Is this by design? Is there any way I can get the functionality I expect (check periodically if the primary DB is back up and fall back to it)?

TIA,

Uri.

Options: ReplyQuote


Subject
Written By
Posted
Fall-back not working?
December 02, 2004 12:05PM
December 02, 2004 03:23PM
December 02, 2004 03:29PM
December 09, 2004 04:01AM
January 17, 2005 06:14AM
January 17, 2005 09:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.