title: How to use ReplicationDriver with multiple EntityManager with Spring
body: <p>I have 2 databases (let's call them <code>User</code> and <code>Stuff</code>), connected to a single Spring-java-web-application via 2 different <code>EntityManager</code>. <code>Stuff</code> has read-replica associated with it. </p>
  
  <p>When I'm using <code>com.mysql.jdbc.Driver</code> to connect to both the dbs, it's working fine and the app is able to connect with both the dbs. But when I'm using <code>com.mysql.jdbc.ReplicationDriver</code> to connect to <code>Stuff</code> (to use read-replica) and <code>com.mysql.jdbc.Driver</code> to connect to <code>User</code>, the app is not able to connect to <code>User</code> and it gives:</p>
  
  <p><code>Connections could not be acquired from the underlying database!</code></p>
  
  <p>Can anyone suggest, how to use 2 <code>EntityManager</code> with read-replica?</p>