-->
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: Thread Leak Problem
PostPosted: Wed Jul 21, 2004 5:47 pm 
Newbie

Joined: Wed Jul 21, 2004 5:37 pm
Posts: 1
Location: Edmonton, Alberta, Canada
Hello,

I'm having some trouble figuring out how to prevent a thread leak that occurs when I hot deploy my application. I noticed that every couple dozen hot deploys I was running out of process space on my Linux box (OutOfMemoryError/unable to create native thread). Bad Thing. So, I attached a thread profiler to my appserver (Orion 2.0.2) and noticed that I was adding duplicates to a list of threads that appears to manage the second-level cache (Store <entityname> Expiry and Spool threads). Am I missing something in my usage of Hibernate (you know, like terminating these threads!)? I am accessing the session factory from a stateless session bean through a singleton that holds the session factory. I assume that I need to call SessionFactory.close() at some point but I'm not sure how to make that happen: the hot deploy process seems to preclude using finalize() for this.

Any ideas?

Thanks,

Greg


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.