Re: Multiple master hosts in JDBC connection string
Posted by: Todd Farmer
Date: July 14, 2014 09:54AM

Hi Serhiy,

You probably want to add failOverReadOnly=false and autoReconnect=true properties to your configuration - this should cause Connector/Java to use the second (failover) host to perform writes when the primary is unavailable. Please note that the failover event itself is not seamless - in-flight transactions and connections will throw a SQLException next time they are used, and for good reason:

http://mysqlblog.fivefarmers.com/2010/07/05/do-you-really-want-autoreconnect-to-silently-reconnect/

That said, once the failover event has been dealt with by the application, the connections will be pointing at the failover (second) host, and allowing write operations.

Hope that helps!

--
Todd Farmer
MySQL @ Oracle
http://www.oracle.com/mysql/

Options: ReplyQuote


Subject
Written By
Posted
Re: Multiple master hosts in JDBC connection string
July 14, 2014 09:54AM


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.