MySQL Connector/J for Failover

Vishal Arora <[email protected]> Mon, 20 Aug 2007 06:11:12 +0000
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
Hi, 
 
I am using MySQL Connector/J 3.1.x on Windows using MySQL 5.0.x. I am trying to achieve HA in MySQL. 
 
I have setup Master-Master Replication in two machines both running on windows. This works fine for me, any updation on any one of the machine is replicated on other. 
 
The url I am using is something like this- 
 
jdbc:mysql://host1,host2:3306/abc?&zeroDateTimeBehavior=convertToNull&autoReconnect=true&failOverReadOnly=false&reconnectAtTxEnd=true
 
In this case my problem is - if I shutdown the mysql service on first host ie.- host1, the Driver does not connects to the second host, and the application gives SQL exceptions like -  
 
Communications link failure due to underlying exception:
 
java.net.SocketExceptionMESSAGE: Connection reset
 
If anyone can help me on this? Please let me know where I am going wrong. 
 
Thanks 
 
Vishal
_________________________________________________________________
Messenger Café — open for fun 24/7. Hot games, cool activities served daily. Visit now.
http://cafemessenger.com?ocid=TXT_TAGLM_AugWLtagline