--- C:/icefaces/ICEfacesEE-1.8.2.GA_P07-src/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.p07release Fri Oct 4 15:18:21 2013 +++ C:/icefaces/ICEfacesEE-1.8.2.GA_P07-src/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.mine Fri Oct 4 15:18:40 2013 @@ -434,11 +434,13 @@ public abstract class SessionDispatcher implements public void shutdown() { //notify all the contexts associated to this monitored session - synchronized (contexts){ - Iterator i = contexts.iterator(); - while (i.hasNext()) { - ServletContext context = (ServletContext) i.next(); - notifySessionShutdown(session, context); + synchronized (SessionMonitors) { + synchronized (contexts){ + Iterator i = contexts.iterator(); + while (i.hasNext()) { + ServletContext context = (ServletContext) i.next(); + notifySessionShutdown(session, context); + } } } try { @@ -445,7 +447,9 @@ public abstract class SessionDispatcher implements session.invalidate(); } catch (IllegalStateException e) { Log.debug("Session already invalidated."); - SessionMonitors.remove(id); + synchronized (SessionMonitors) { + SessionMonitors.remove(id); + } } }