title: How to use database as backup/failover in hibernate?
body: <p>My application is based on the hibernate to fetched data from a mysql server. This mysql server is replicated to another mysql server instance. Today, I got a downtime as the primary database server was gone down without any notice. To avoid any future accidental problem, I am planing to add a functionality that will enable system to connect to secondary database if it finds the primary down.</p>
  
  <p>Is there exists a way by which, I can leverage hibernate library to enable this functionality?</p>