1 25 26 27 package com.lutris.appserver.server.sessionEnhydra; 28 29 import java.util.Date ; 30 31 import javax.servlet.http.HttpSession ; 32 33 import com.lutris.appserver.server.Application; 34 import com.lutris.appserver.server.httpPresentation.HttpPresentationComms; 35 import com.lutris.appserver.server.session.Session; 36 import com.lutris.appserver.server.session.SessionException; 37 import com.lutris.logging.LogChannel; 38 import com.lutris.util.Config; 39 import com.lutris.util.ConfigException; 40 41 49 public class SimpleServletSessionManager extends StandardSessionManager { 50 51 public SimpleServletSessionManager (){ 52 super(); 53 } 54 55 74 public SimpleServletSessionManager (Application application, Config config, 75 LogChannel sessionMgrLogChannel) 76 throws ConfigException, SessionException { 77 super(application,config,sessionMgrLogChannel); 78 } 79 80 98 public SimpleServletSessionManager (ClassLoader classLoader, Config config, 99 LogChannel sessionMgrLogChannel) throws ConfigException, SessionException { 100 super(classLoader,config,sessionMgrLogChannel); 101 } 102 103 113 public Session createSession (HttpPresentationComms comms) throws SessionException { 114 Session session = null; 115 HttpSession servletSession = comms.request.getHttpServletRequest().getSession(); 116 String servletSessionId = servletSession.getId(); 117 session = sessionHome.createSession(servletSessionId); 118 int currentSize = sessionHome.size(); 119 if (currentSize > maxSessions) { 120 maxSessions = currentSize; 121 maxSessionsDate = new Date (); 122 } 123 return session; 124 } 125 } 126 127 128 129 | Popular Tags |