-->
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: Flushing Session during "Session.find"
PostPosted: Wed Apr 14, 2004 1:21 pm 
Beginner
Beginner

Joined: Sat Nov 22, 2003 3:54 pm
Posts: 42
Hi,

Does the Hibernate "flushes" the Session when we execute a "find" method on Session.

Ours a 3 tier web application and the Hibernate Session are managed by ThreadLocal way .

I am doing a simple "find" on the session and then after getting the result, i am closing the session -- but when i look at the log file generated , Hibernate prints out this DEBUG information.
-------------------------------------------------------
2004-04-12 13:40:05,565 DEBUG [net.sf.hibernate.hql.QueryTranslator] compiling query
2004-04-12 13:40:05,567 DEBUG [net.sf.hibernate.impl.SessionImpl] flushing session
2004-04-12 13:40:05,569 DEBUG [net.sf.hibernate.impl.SessionImpl] Flushing entities and processing referenced collections
------------------------------------------------------------
After this it prints out a lot of these in 100's kind of statement
2004-04-12 13:40:05,706 DEBUG [net.sf.hibernate.impl.SessionImpl] Collection found:<<class name and other stuff>>
--------------------------------------------------------------
It also prints out this info before printing the HQL

2004-04-12 13:40:05,740 DEBUG [net.sf.hibernate.impl.SessionImpl] Dont need to execute flush
--------------------------------------------------------------------

So the question is does the Hibernate automatically flushes the "session" while executing "find" upon it and if yes how i can turn the "flush" off.

Your help will be highly appreciated.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 14, 2004 2:46 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Does the Hibernate "flushes" the Session when we execute a "find" method on Session.

yes it can, read the reference doc, you'll find all you need


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.