-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Reg : ConnectionPooling!
PostPosted: Tue Jan 27, 2009 4:16 am 
Newbie

Joined: Fri Jan 02, 2009 2:14 am
Posts: 15
Hi All,

Actually Requirement is that, want to check that how many connectionPooling Connections are used/using.. through check the code.. not on server. Please any one tell the code how can we check the through code?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 27, 2009 6:16 am 
Regular
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....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.