1 4 5 9 10 package org.openlaszlo.data; 11 12 import java.util.*; 13 import javax.servlet.http.*; 14 import org.openlaszlo.servlets.responders.ResponderCache; 15 import org.apache.log4j.Logger; 16 17 20 public class SessionBindingMap extends HashMap 21 implements HttpSessionBindingListener { 22 23 private static Logger mLogger = Logger.getLogger(SessionBindingMap.class); 24 25 public void valueBound(HttpSessionBindingEvent event) { 26 if (mLogger.isDebugEnabled()) { 27 mLogger.debug(event.getName() + " bound for session " + 28 event.getSession()); 29 } 30 JavaDataSource.mSessionCounter.increment(); 31 } 32 public void valueUnbound(HttpSessionBindingEvent event) { 33 if (mLogger.isDebugEnabled()) { 34 mLogger.debug(event.getName() + " unbound for session " + 35 event.getSession()); 36 } 37 JavaDataSource.mSessionCounter.decrement(); 38 39 Map m = (Map)event.getValue(); 41 JavaDataSource.mSessionObjectsCounter.decrement(m.size()); 42 } 43 } 44 45 | Popular Tags |