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: Find amount of queries executed per Session
PostPosted: Wed Apr 18, 2007 8:24 am 
Newbie

Joined: Fri Mar 16, 2007 6:04 am
Posts: 14
I have read this thread

http://forum.hibernate.org/viewtopic.php?p=2347110&highlight=#2347110

and the references provided, but the problem is that I want to get the number of queries executed for a specific session and not the total since the SessionFactory was build.

In the source I saw
queryExecutionCount++;
everytime queryExecuted(String hql, int rows, long time) was called.

Is there a way that I can get the amount for the current session???

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 18, 2007 9:36 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
The Statistics API only tracks on a per-SessionFactory level. The only way that I can think of to do what you would like is to reset the statistics at the open of every session. Implementing that functionality would depend on your architecture.


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.