InstanceManager instanceManager =
(InstanceManager) config.getServletContext().getAttribute(InstanceManager.class.getName());
if (instanceManager == null) {
synchronized(InstanceManagerFactory.class) {
if (cachedManager == null) {
cachedManager = new SimpleInstanceManager();
}
}
instanceManager = cachedManager;
//throw new IllegalStateException("No org.apache.tomcat.InstanceManager set in ServletContext");
}