title: Is there any way to find the no of active connections to a database without using SQL queries?
body: <p>I want it programmatically (JAVA or any other frameworks of java) to find the no of active connections to a database but there shouldn't be any SQL queries used.
  Using SQL queries in java program i found the no of active connections, but i don't want it through queries. If there's any other method please let me know.
  Actually i created a connection pool using BasicDataSource but the getNumActive() method shows only the connections made through the app but doesn't give the no of connections made to the database.</p>