Subject | FBConnectionPoolDataSource problems |
---|---|
Author | mapofe |
Post date | 2004-06-25T09:15:32Z |
Hello,
I instantiate a FBConnectionPoolDataSource that way:
FBConnectionPoolDataSource xaDatasource = new
FBConnectionPoolDataSource();
xaDatasource.setType(GDSType.getType("PURE_JAVA").toString());
xaDatasource.setDatabase("localhost/3050:D:/Projects/test/test.fdb");
xaDatasource.setMinConnections(0);
xaDatasource.setMaxConnections(2);
xaDatasource.setPingInterval(5000);
Properties p = new Properties();
p.setProperty(FBDriver.USER, "sysdba");
p.setProperty(FBDriver.PASSWORD, "masterkey");
p.setProperty("charSet", "ISO8859_1");
but as soon as I try to get a connection
xaDatasource.getXAConnection();
the driver does not return anymore. Looking at the code I noticed that
in PooledConnectionQueue.take() the driver wasn't able to get a
connection because userName and password failed, although correctly
initialized, and entered an infinite loop.
FBConnectionPoolDataSource.getPooledConnection() actually is hardcoded
to use EMPTY_USER_PASSWORD instead of the previously provider credentials.
Getting a connection as follows works:
xaDatasource.getXAConnection("masterkey", "sysdba");
Regards
Massimo
I instantiate a FBConnectionPoolDataSource that way:
FBConnectionPoolDataSource xaDatasource = new
FBConnectionPoolDataSource();
xaDatasource.setType(GDSType.getType("PURE_JAVA").toString());
xaDatasource.setDatabase("localhost/3050:D:/Projects/test/test.fdb");
xaDatasource.setMinConnections(0);
xaDatasource.setMaxConnections(2);
xaDatasource.setPingInterval(5000);
Properties p = new Properties();
p.setProperty(FBDriver.USER, "sysdba");
p.setProperty(FBDriver.PASSWORD, "masterkey");
p.setProperty("charSet", "ISO8859_1");
but as soon as I try to get a connection
xaDatasource.getXAConnection();
the driver does not return anymore. Looking at the code I noticed that
in PooledConnectionQueue.take() the driver wasn't able to get a
connection because userName and password failed, although correctly
initialized, and entered an infinite loop.
FBConnectionPoolDataSource.getPooledConnection() actually is hardcoded
to use EMPTY_USER_PASSWORD instead of the previously provider credentials.
Getting a connection as follows works:
xaDatasource.getXAConnection("masterkey", "sysdba");
Regards
Massimo