We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2e77eb commit 1026ec6Copy full SHA for 1026ec6
src/main/java/com/exp/tracker/utils/TrackingBasicDataSource.java
@@ -0,0 +1,21 @@
1
+package com.exp.tracker.utils;
2
+
3
+import java.sql.Connection;
4
+import java.sql.SQLException;
5
6
+import org.apache.commons.dbcp.BasicDataSource;
7
+import org.apache.commons.logging.Log;
8
+import org.apache.commons.logging.LogFactory;
9
10
+public class TrackingBasicDataSource extends BasicDataSource
11
+{
12
+ private static final Log logger = LogFactory
13
+ .getLog(TrackingBasicDataSource.class);
14
15
+ public Connection getConnection() throws SQLException {
16
+ if (logger.isDebugEnabled()) {
17
+ logger.debug("Active database connections count = " + getNumActive());
18
+ }
19
+ return super.getConnection();
20
21
+}
0 commit comments