Logging in DBCP

前端 未结 4 708
刺人心
刺人心 2021-02-07 13:59

I\'m using Apache Commons DBCP. There is a task to track the inner behavior of the DBCP - number of active and idle connections.

I found out that DBCP lacks any such lo

4条回答
  •  名媛妹妹
    2021-02-07 14:13

    If you have access to the DataSource object, you can cast it to BasicDataSource and get the maxIdle and maxActive connections using getNumActive() and getNumIdle() methods.

提交回复
热议问题