I trying to set up a repository selector based on Ceki's doc http://qos.ch/containers/sc.html .
I put the CRS class in $TOMAT_HOME/shared/lib and added the following to my Log4jInit class before running any configurator: Object guard = new Object(); LogManager.setRepositorySelector(new Log4jCRS(), guard); That all seems to work fine. However, I need to remove this entry when I shut the app down. Note the remove method in the CRS class: /** * The Container should remove the entry when the web-application * is removed or restarted. * */ public void remove(ClassLoader cl) { ht.remove(cl); } I could do that in the contextDestroyed() method in my servlet context listener. However, how to I get a handle on the original CRS object to call the remove on? I need to do that, right? If I just grab a new one, it will have an empty hashtable and callling remove will be pointless...if not cause an exception. I don't quite see a way to get it through LogManager. Am I missing something? Jake