-->
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.  [ 5 posts ] 
Author Message
 Post subject: Why Java reports OutOfMemoryException after running sometime
PostPosted: Fri Aug 29, 2003 10:01 am 
Beginner
Beginner

Joined: Tue Aug 26, 2003 11:33 pm
Posts: 38
My web application use hibernate 2.0.2 which is running on Resin. After running for some time, it reports OutOfMemory error. I don't know where the memory leak is . I do close the session in finally clause in every servlet.

Any clue ?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 29, 2003 1:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
You have not posted nearly enough information for help. But, in web apps, this can typically be attributed to one of two things:

1) Storing a lot of references into session and/or application scope[/list]
2) Not giving the application enough memory to play with on startup (e.g., the default HotSpot setting on windows are a mere 32K).


Top
 Profile  
 
 Post subject: Thank u ! steve, I'll check, but ...
PostPosted: Fri Aug 29, 2003 10:26 pm 
Beginner
Beginner

Joined: Tue Aug 26, 2003 11:33 pm
Posts: 38
When does hibernate release cached objects then ? After each session.close() ? Anyone can explain how hibernate's caching mechanism works internally ? Is it session oriented ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 29, 2003 10:48 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
If you are not utilizing the JCS caching, then yes. The objects cached within the session are released when the session is closed.

If you want them released sooner, you can explicitly do so with the evict() method.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 30, 2003 12:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Even when you are using JCS caching. Hibernate never caches actual persistent instances between sessions.


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