Problem with multiple DbManagers
Posted: 26 Nov 2012, 12:23
The docs say this is possible but I'm seeing problems trying to do it in Java. I create one DbManager GameDBManager in the XML config file like so:
I create the other, LoginDBManager in code, pointing to a DB on a totally different server (we share login between our game and an existing website):
When I do:
I get an error:
Code: Select all
<ConnectionString>jdbc:mysql://----------------.com:3306/GameDB</ConnectionString>Code: Select all
jdbc:mysql://--------------.com:3306/LoginDBCode: Select all
GameDBManager.executeQuery("select count(*) from users");So in summary, GameDBManager is running queries against LoginDB! How is this happening - is DbManager actually a singleton or something like that?14:51:15.836 - [ SEVERE ] > DbManager error during query/result creation: select count(*) from users
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'LoginDB.users' doesn't exist