-->
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.  [ 3 posts ] 
Author Message
 Post subject: session.clear()
PostPosted: Fri Apr 15, 2005 9:21 am 
Newbie

Joined: Tue Apr 12, 2005 12:01 pm
Posts: 10
Location: London, UK
Dear all,

I have a simple query. Although in my web application I have less than 100 objects but these objects are loaded thousands of time, saved and updated into database. My question is, when I am closing the session is it a good idea to call session.clear() first or is it not really beneficial? Shall I only call session.clear() when I am operating with a large data set?

_________________
Many thanks...
Arup


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 15, 2005 3:11 pm 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
You don't need to explicitly clear the session when closing it - it is 'cleared' in effect once closed.

This may answer the second part of your question:
http://blog.hibernate.org/cgi-bin/blosx ... 8/26#batch


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 16, 2005 12:11 pm 
Newbie

Joined: Tue Apr 12, 2005 12:01 pm
Posts: 10
Location: London, UK
drj wrote:
You don't need to explicitly clear the session when closing it - it is 'cleared' in effect once closed.

This may answer the second part of your question:
http://blog.hibernate.org/cgi-bin/blosx ... 8/26#batch


Hi there,

Thanks a lot. I did see that post earlier on and since then I have been wondering if I needed to do it. Problem is, with out application, the memory usage seems to just creep up every so slowly and eventually leads to permanent generation space on the heap being exhausted.

Since then, we have carried out lots of optimisations but I am in a strange situation at the moment whereby our development build is in a stable stage and is about to be released with all these optisation and load tests so far have not showed up any problems. However, with the old build I found that increasing the permanent generation space had a positive effect but only for a two or three days. So I just really need to be sure that hibernate is not doing something strange. Anyway, it looks as if that it isn't the case.

Many thanks for your reply. I shall let you all know the end of this as and when we get close to it.

Arup


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.