-->
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.  [ 4 posts ] 
Author Message
 Post subject: Unload hibernate classes from memory
PostPosted: Tue May 06, 2008 6:01 am 
Newbie

Joined: Tue May 06, 2008 5:39 am
Posts: 2
Dear Hibernate Gurus,

I write desktop standalone application and due of tight memory requirements I want to unload hibernate and related classes from memory when they are not necessary(application IDLE period).

I isolate all DB classes into separate class loader, split into several independent jar files, and create hibernate instances dynamically. But after I release everything(or I think that everything) hibernate classes still sit in memory.

I dig with jmap and jhat and some other heap analyze tools, but can't catch who keep this loader.

I search this forum and found some similar topics, but they are not exactly the same(mostly for webapps) I need and resolution is not clear to me.

From my point of view usage class loader usage looks clear, maybe there are some Hibernate specific which I am missed so I will really appreciate for any help to solve this problem.

I isolate work with DB into small Eclipse project http://zuban.com.ua/hib/SampleApp.zip

In this project I
* initialize session factory
* open session
* close session
* release session factory
* unregister drivers
* reset logger factory for class loader
* release class loader
* shutdown working thread
* GC couple of times

But... classes still in the memory

_________________
---------------------
Best regards,
Alexander Zuban
http://zuban.com.ua


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 6:04 am 
Newbie

Joined: Tue May 06, 2008 5:39 am
Posts: 2
Forget to mention. In the given sample application I connect to Postgres DB, but I also try some others(H2). And it is necessary to run ANT before starting bundled launch configuration.

_________________
---------------------
Best regards,
Alexander Zuban
http://zuban.com.ua


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 12, 2008 7:19 am 
Newbie

Joined: Tue Sep 23, 2008 8:54 am
Posts: 4
Hi Alexander ,

Even i am looking for same solution did u get any solution if so please help on that . thanks in advance


Top
 Profile  
 
 Post subject: Re: Unload hibernate classes from memory
PostPosted: Thu Jun 04, 2009 9:51 am 
Newbie

Joined: Thu Jun 04, 2009 9:40 am
Posts: 3
Hi!

any solution for that problem?


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