1

Possible Duplicate:
How to monitor c3p0 connections

How can I get database connection pool information such as total connections in use, connection remaining etc ?. I want this information for logging (troubleshooting) purposes. I am using Hibernate with C3P0.

Community
  • 1
  • 1
Umer Hayat
  • 1,993
  • 5
  • 31
  • 58

2 Answers2

2

We used getStatistics and getConnectCount on it, but it doesnt have any particular function to show current open connections. The getConnectCount displays the total number of connections opened

jyo
  • 21
  • 2
1

Use getStatistics() method of your SessionFactory as per documentation.

Vlad
  • 10,602
  • 2
  • 36
  • 38
  • i tried Statistics, as you mentioned, but i am unable to get required information. Can you please pin point any particular function, which you think should work for me. Thanks – Umer Hayat Aug 02 '11 at 09:56