2

我有 2 个数据库(我们称它们为UserStuff),通过 2 个不同的EntityManager. Stuff有与之关联的只读副本。

当我com.mysql.jdbc.Driver用来连接两个数据库时,它工作正常,应用程序能够连接两个数据库。但是当我com.mysql.jdbc.ReplicationDriver用来连接到Stuff(使用只读副本)和com.mysql.jdbc.Driver连接到User时,应用程序无法连接到User它并给出:

Connections could not be acquired from the underlying database!

谁能建议,如何将 2EntityManager与只读副本一起使用?

4

0 回答 0