Regular |
|
Joined: Wed Oct 15, 2008 6:59 am Posts: 103 Location: Chennai
|
u may use getStatistics() to get global open connection. but not actual connection opened.
dbSession.getSessionFactory().getStatistics().getConnectCount();
--------------------------------
Well this is not something Hibernate can tell you.
If you are using a connection pool changing the ConnectionReleaseMode will release connections back to the pool. It will not physically close connections. How many actual connections have been made is information you will get from your connection pool implementation, not Hibernate. Since you are using a DataSource in JBoss you can look at this via the jmx-console, and hence you will be able to get it programatically from the JBossManagedConnectionPool MBean.
_________________ If u feel it will help you, don't forget to rate me....
|
|