-->
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.  [ 1 post ] 
Author Message
 Post subject: Memory problem
PostPosted: Sat Jan 29, 2005 3:24 pm 
Beginner
Beginner

Joined: Thu Aug 19, 2004 5:36 am
Posts: 30
Location: Italy
Hibernate version: 2.1.7

Name and version of the database you are using: PostgreSQL 8.0

I'm writing a web application using Tomcat 5 and I've just started to add the persistence layer.

In this application I need several SessionFactory(es) that are initialized in a class implementing the ServletContextListener interface.

After a good number of stop/start of the application (without calling any action!: only starting and stopping) I've got an OutOfMemoryException.

Checking the initialization procedure I realized that SessionFactory was never closed and so I've added a .close() but the problem persist:
at every restart of web application some megabytes of memory are allocated and never released (sometimes 1 or 2; sometimes 4 or 5mb).
In this test I have 2 SessionFactory: one with 5 trivial mappings and another with 2 mappings (a parent/child).


At the end of these tests I'm quite sure that the problem is in sessionfactory creation (removing this operation the memory usage is normal).

I'm also sure that I'm making some huge mistake, but I cannot figure out where.

Any suggestion?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.