我有 2 个数据库(我们称它们为User
和Stuff
),通过 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
与只读副本一起使用?