From: Bill H. <bi...@lo...> - 2003-09-11 23:55:19
|
Hi Keith, On Thu, 2003-09-11 at 19:42, Cochran, Keith wrote: > I figured it out. My Relativity driver does not like the following: > > info.setProperty("house-keeping-sleep-time", String.valueOf(30 * 1000)); > info.setProperty("proxool.house-keeping-test-sql", > "SELECT eenmbr from elgemp where eenmbr = 1"); > > This is a valid SQL statement for my db, but the house-keeping-sleep-time > parameter > causes a null pointer exception for some reason. That is weird. Just out of interest, does your JDBC driver support you using that same SQL statement? I just want to confirm that this is a Relativity quirk and not something precipitated by Proxool. For your information, the house keeper just does this: String sql = definition.getHouseKeepingTestSql(); if (sql != null && sql.length() > 0) { // A Test Statement has been provided. Execute it! boolean testResult = false; testResult = testStatement.execute(sql); } I might look into this some more. I would expect a NullPointerException during housekeeping to simply log the error and throw away the connection. It shouldn't pass that exception to the user. Ah, now I see. The house keeper only reacts gracefully to SQLExceptions. It doesn't expect RuntimeExceptions. I will fix that. I would think that any exception thrown during the execution of the test SQL should simply result in that connection being removed from the pool and the error logged. Nothing more. Look out for that fix in the soon-to-be-released 0.8.0. Cheers, Bill |