1 16 17 package org.springframework.web.util; 18 19 import java.io.Serializable ; 20 21 import javax.servlet.http.HttpSessionEvent ; 22 import javax.servlet.http.HttpSessionListener ; 23 24 45 public class HttpSessionMutexListener implements HttpSessionListener { 46 47 public void sessionCreated(HttpSessionEvent event) { 48 event.getSession().setAttribute(WebUtils.SESSION_MUTEX_ATTRIBUTE, new Mutex()); 49 } 50 51 public void sessionDestroyed(HttpSessionEvent event) { 52 event.getSession().removeAttribute(WebUtils.SESSION_MUTEX_ATTRIBUTE); 53 } 54 55 56 61 private static class Mutex implements Serializable { 62 } 63 64 } 65 | Popular Tags |