Adding memory leak prevention listeners to catalina-server.xml.