// /Notification that the servlet context is about to be shut down public void contextDestroyed(ServletContextEvent sce) { if (Constant.debug) System.out.println("contextDestroyed"); }
// Notification that a session was created public void sessionCreated(HttpSessionEvent se) { ircmSessionContent.AddSession(se.getSession()); //if (jtml.util.db.Parameter.isDEBUG()) { if (Constant.debug) { count++; System.out.println("sessionCreated创建-line:"+count); } // }
}
// Notification that a session was invalidated public void sessionDestroyed(HttpSessionEvent se) { HttpSession session = se.getSession(); ircmSessionContent.DelSession(session); String userID =""; if (se.getSession().getAttribute(Constant.UserId) != null) { userID = se.getSession().getAttribute(Constant.UserId).toString(); } if (Constant.debug) { count--; System.out.println("sessionDestroyed销毁--line:"+count); System.out.println("sessionDestroyed--map:"); } } // Notification that a new attribute has been added to a session public synchronized void attributeAdded(HttpSessionBindingEvent se) { if (Constant.debug){ if(Constant.SessionUser.equals(se.getName())) { UserPO user = (UserPO)se.getValue(); map.put(user.getUser_id(), se.getSession()); mapSessionTime.put(user.getUser_id(), Long.toString(se.getSession().getCreationTime())); System.out.println("list chandu =" + list.size()); if(list.indexOf(String.valueOf(user.getUser_id())) < 0) list.add(String.valueOf(user.getUser_id())); } System.out.println("sdfasdf********sename" + se.getName()); } }
// Notification that an attribute has been removed from a session public synchronized void attributeRemoved(HttpSessionBindingEvent se) { if (Constant.debug){ if(Constant.SessionUser.equals(se.getName())) { UserPO user = (UserPO)se.getValue(); map.remove(user.getUser_id()); mapSessionTime.remove(user.getUser_id()); System.out.println("list chandu2 =" + list.size()); list.remove(String.valueOf(user.getUser_id())); } System.out.println("attributeRemoved*"); } }
// Notification that an attribute of a session has been replaced public synchronized void attributeReplaced(HttpSessionBindingEvent se) {