commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Schofield" <sean_schofi...@schof.com>
Subject Re: [chain] New interface: CatalogFactory
Date Tue, 05 Oct 2004 21:29:50 GMT

>Yes, although if you have one for that purpose you might also use it
>to read your configuration information and set up the catalogs (i.e.
>like what ChainListener already does).
>
>  
>
Good point.  I will look into it and report back.

>Java doesn't have any API to unload classes.  Therefore, when you
>reload a webapp, what the container does is throws away its reference
>to the class loader.  If the app is well behaved, that will make all
>the classes and objects instantiated by that webapp into garbage that
>can be collected and reused.
>
>If your map of class loader -> catalog entries is not cleaned up, then
>there is still a live reference to the class loader, and hence live
>references to all the old objects.  End result -- massive memory leak
>on every application reload.  Not a good thing.
>
>  
>
Wow I had not realized the implications of that!  I was just thinking 
that the reference to the Catalogs would be lying around (a lot less of 
a memory issue.)  I suppose that makes sense though.  I don't know a lot 
about the specifics of class loader and how they work with garbage 
collection (clearly an area for more research on my part.)

>We could just add it to ContextListener, and extend the configuration
>processing to deal with multiple catalogs.
>  
>
As with my earlier comment, I will look into it and report back.

sean


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message