Re: [c3p0-users] ConnectionTester not getting callbacks
Status: Beta
Brought to you by:
swaldman
From: Hari K. D. <har...@gm...> - 2007-05-29 23:03:20
|
On 5/29/07, Hari Krishna Dara <har...@gm...> wrote: > > I am using the ConnectionTester to pry on the exceptions that get > generated while c3p0 is handing connections. This seems to work most of the > time, including when the database (mysql) is shutdown (results in > com.mysql.jdbc.CommunicationsException ). There is however one instance in > which the callbacks are not happening. If I terminate the mysql-d process > (forcefully), I start seeing exceptions on the console, but no callbacks. I > notice that the type of exception that is logged by c3p0 is exactly same, > with the same cause ( java.net.ConnectionException: Connection refused: > connect), but c3p0 behaves differently in this case. > > Could this be a bug in c3p0 or just something that I am not > understanind/using right? > > Thank you, > Hari > To add some more information, I compared the stacks on the console and I see a difference in the origin of the calls. When I stop the service (graceful shutdown), the first frame is: at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run( ThreadPoolAsynchronousRunner.java:547) and when I terminate the process, it is: at com.mchange.v2.async.ThreadPerTaskAsynchronousRunner$TaskThread.run( ThreadPerTaskAsynchronousRunner.java:255) I don't know what is causing this difference as I expected both to appear exactly same to the application. I would appreciate any inputs. Thank you, Hari |