At 07:45 PM 1/22/2005, Jacob Kjome wrote:
At 06:49 PM 1/22/2005 +0100, Ceki Gulcu wrote:
>In 1.3, you can detach a repository by name. In 1.2.x you cannot. So,
>when your web-app is recycled you can shutdown and detach it whereas
>in 1.2 your repository will not be recycled along with your
>web-app. See also [1] o.a.l.selector.servlet.ContextDetachingSCL.
>

It should be shut down upon webapp shutdown using LogManager.shutdown(), which InitContextListener does. It just doesn't do it by name. If you call LogManager.shutdown(), it should shut down the current logger repository, right? I haven't looked at this code lately in 1.3, but it should do the same thing without needing to know the name of the current logger repository. It might be nice to know for logging purposes, but why is it needed?

Good question. When recycling a web-app, the idea is to allow the app server to garbage collect the class loader associated with the stale version of the web-application. Removing the reference from the map managed by the selector is safer way to ensure garbage collection than shutting down the repository. However, if the shutdown method in Hierarchy is totally bug free then the two forms should be equivalent (me thinks).


--
Ceki G�lc�

  The complete log4j manual: http://www.qos.ch/log4j/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to