On Mon November 9 2009 7:25:21 am Daniel Feist wrote: > No thoughts on this one? I'll go ahead and file JIRA's then with > patches... not sure about test cases though, have to think about to > reproduce/test with unit test.
Please file JIRA's and patches if at all possible. I'm actually wondering if some of your descriptions are the causes of: https://issues.apache.org/jira/browse/CXF-2286 https://issues.apache.org/jira/browse/CXF-1816 If we can get your patches in, it would be good to recheck those to see if they are then fixed. > > Probable Causes: > > - org.apache.cxf.common.util.ASMHelper.LOADER_MAP > > > > This map continues to have reference to classes generated and used > > by the now undeployed webapp meaning the webapp classloader never > > goes away. > > The implementation of this map although weak is not weak enough, > > because if a entry references a key (it seems to) then the key > > although it is a WeakReference never goes away and therefore neither > > does the entry (the classloader). OK. Makes sense. > > - org.apache.cxf.jaxb.JAXBDataBinding.JAXBCONTEXT_CACHE > > > > Here is appears we have another map the maintains references to the > > generated classes and in turn to the webappClassloader that is no > > more expect this one doesn't even try to be weak. I notice there is > > a clearCaches() method but i'm unsure about using that at anytime in > > runtime because even though i'm taking down one cxf Service there > > may be user services alive using jaxb at the same time. The clearCaches is just there for use in the unit tests where we want to make 100% sure the caches are cleared out before a test runs. Definitely check this with trunk and even the latest 2.1.x code on the 2.1.x branch. I believe the JAXBCONTEXT_CACHE stuff has gone through a couple iterations, just not exactly sure when each of the iterations occurred. It's currently using a CacheMap which does use weak keys, but the JAXBContext it holds in the value probalby holds the same Class objects and thus suffers the same problem as the ASM thing you mentioned. Patches would be good. :-) Dan > > I didn't file any jira issue(s) yet because I wanted to push it out > > on the list first and see if there was anything I was missing or if > > this is indeed a real issue. > > > > thank! > > > > Dan > -- Daniel Kulp [email protected] http://www.dankulp.com/blog
