-->
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 Memory
PostPosted: Thu May 10, 2007 12:31 pm 
Newbie

Joined: Thu May 03, 2007 7:53 am
Posts: 15
Hi,

I am mapping about 150 000 objects (from 1 table) in my app with hibernate and I see that jboss process does not release memory flushing and closing my session. About 100mo for each group of select.

Have you got any idea to release memory used by objects ?

Thanks,

Regards,


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 10:40 pm 
Senior
Senior

Joined: Sat Aug 19, 2006 6:31 pm
Posts: 139
Session close should release the memory. Of course you wouldn't see the memory released as soon as you close the session. You'd only see it when the next garbage collection happens.

_________________
Don't forget to rate the reply if it helps..:)

Budyanto


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 11:59 pm 
Regular
Regular

Joined: Mon Mar 26, 2007 12:38 am
Posts: 119
Hi,
>>> Have you got any idea to release memory used by objects ?
Make a persistent object detached.
As himawan said, session.close() does it. All objects in session are detached.
Other ways are,
i) session.evict(object) ; // detach one object
ii) session.clear() ; // detach all objects in the session

------------------------------------------
Rate the reply if you find it helpful


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.