{
throw new ServletException( "Encountered an error closing resource streams.", e );
}
}
LoggerManager loggerManager = m_componentManagerCreator.getLoggerManager();
// A series of ReferenceProxies which will be used to access the ComponentManager
// and other managers created by the ComponentManagerCreator must be created.
// This is necessary because the order in which servlets are shut down by a
// ServletContainer can not be controlled. If a manager is disposed before all
// servlets have released their references to it, then errors can result.
// Create the latch which will manager the ReferenceProxies.
m_latch = new Latch( m_componentManagerCreator );
m_latch.enableLogging( loggerManager.getLoggerForCategory( "system.ecmservlet" ) );
// Create the actual ReferenceProxies.
ReferenceProxy loggerManagerProxy = m_latch.createProxy(
loggerManager, "LoggerManager" );
ReferenceProxy serviceManagerProxy = m_latch.createProxy(