Index: core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java (revision 38802) +++ core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java (revision ) @@ -434,19 +434,24 @@ public void shutdown() { //notify all the contexts associated to this monitored session + synchronized (SessionMonitors) { - synchronized (contexts){ + synchronized (contexts) { - Iterator i = contexts.iterator(); - while (i.hasNext()) { - ServletContext context = (ServletContext) i.next(); - notifySessionShutdown(session, context); - } - } + Iterator i = contexts.iterator(); + while (i.hasNext()) { + ServletContext context = (ServletContext) i.next(); + notifySessionShutdown(session, context); + } + } + } try { session.invalidate(); } catch (IllegalStateException e) { Log.debug("Session already invalidated."); + synchronized (SessionMonitors) { - SessionMonitors.remove(id); - } + SessionMonitors.remove(id); + } + } + } public void shutdownIfExpired() { \ No newline at end of file