I've implemented a pool using the BasicDataSource and just discovered
that the test on borrow validation SQL isn't working. I'm not at all
familiar with either commons logging or log4j and can't for the life of
me figure out how to turn on debugging for this jar.
Code snippet as follows:
BasicDataSource dataSource = new BasicDataSource();
dataSource.setUsername(username);
dataSource.setPassword(password);
dataSource.setUrl(url);
dataSource.setInitialSize(initialSize);
dataSource.setMinIdle(initialSize);
dataSource.setMaxActive(maxSize);
dataSource.setValidationQuery("select 1 from dual");
dataSource.setTestOnBorrow(true);
...
Connection con = dataSource.getConnection();
If I first initialize the pool, get a connection, and then restart my
database - a subsequent call to dataSource.getConnection() returns a bad
connection that has not passed the validation query. I verified this by
manually executing the same statement on the connection and it throws a
SQLException with "broken pipe" or "cannot read from socket" error
depending on Oracle version.
Please help. Additionally, if someone can enlighten me on how to turn
on debugging I'd be forever grateful.
Thanks.
--
Regards,
Scott Dudley
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]