|
From: Dmitriy K. <dko...@ru...> - 2004-05-03 19:28:57
|
I'm just wondering, would the use of WeakHashMap in CachedIntrospectionResults help? Dmitriy. Tim Kettering wrote: > > I posted this to the users list last week and did not receive any reply > on it, so I'm posting it again here on the developer list, in hopes i > could get an reply from someone here. I'm trying to determine if its > something I should be doing myself, or if hte spring context should be > cleaning up those resources by itself on the .close() call. Further > profiling shows that there are duplicate instances of SQLError and > hibernate proxy classes hanging around afterwards too. Other objects > do get cleaned up properly. > > -------- > Hi everyone, > > We're (meaning me) looking into some resource leaks that are occuring > when our webapp context gets reloaded. I found that context.close() > needs to be called on the destroy() method of plugin we're using, and > it works for a good majority of the objects we were seeing leaked, but > there are some objects that I'm unable to make go away. Object in > question is the: > > org.springframework.beans.CachedIntrospectionResults > > Whenever I reload the context - the profiler I'm using shows that I > have essentially a duplicate group of those objects (same instance > count) as the original, and successive reloads will continue to > duplicate this. > > The profiler also shows the final reference to those objects like this: > > 100% - 1008 bytes - 63 alloc. > org.springframework.context.support.ClassPathXmlApplicationContext.<init > > > So basically I guess what I'm asking is for ideas or suggestions on how > I could get those to clean up. This bean doesnt show up in the Spring > javadocs. And looking in CVS says its a package level bean, not for > application use, so I'm thinking that closing the context should (in > theory) clean this up? Thanks in advance. > > -tim > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |