日期:2014-05-20 浏览次数:21100 次
public class UserHttpSessionEventPublisher implements HttpSessionListener
{
private static final String LOGGER_NAME = UserHttpSessionEventPublisher.class.getName();
//~ Methods ========================================================================================================
/* ApplicationContext getContext(ServletContext servletContext)
{
return WebApplicationContextUtils.getWebApplicationContext(servletContext);
}*/
/**
* Handles the HttpSessionEvent by publishing a {@link HttpSessionCreatedEvent} to the application
* appContext.
*
* @param event HttpSessionEvent passed in by the container
*/
public void sessionCreated(HttpSessionEvent event) {
在这里累加,(可通过保存在session里的登录用户信息,判断是不是同一人,)
}
@Override
public void sessionDestroyed(HttpSessionEvent event){
在这里-1;
}