使用时出现如下错误:
com.mchange.v2.async.ThreadPoolAsynchronousRunner -46651078 [Timer-18] WARN com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1c17bd4 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
解决办法:
把max_statements设置为0。
c3p0在同时关闭statement和connection的时候,或者关闭他们之间的时间很短的时候,有时候connection并没有被关闭,因为有些preparedstatement还在被cached住。这是c3p0的作者自己说的。
另一种办法是换成proxool,因为c3p0有bug.
http://blog.csdn.net/bnlovebn/article/details/6540119