public override SessionStateStoreData GetItem(HttpContext context, string id, out bool locked, out TimeSpan lockAge, out object lockId, out SessionStateActions actions) { locked = false; lockAge = TimeSpan.Zero; lockId = null; actions = SessionStateActions.None; if (id == null) { return(null); } HttpSession session = GetSession(context, false, false); if (session == null) { return(null); } ServletSessionStateItemCollection sessionState = session.getAttribute(J2EEConsts.SESSION_STATE) as ServletSessionStateItemCollection; if (sessionState == null) //was not set { sessionState = new ServletSessionStateItemCollection(context); } return(new SessionStateStoreData( sessionState, sessionState.StaticObjects, GetIntervalInMinutes(session.getMaxInactiveInterval()))); }
public override SessionStateStoreData CreateNewStoreData (HttpContext context, int timeout) { // we ignore this timeout and use web.xml settings. //must set now as this can be a last chance for ro item //GetSession (context, false).setMaxInactiveInterval (timeout * 60); int javaTimeoutInSeconds = GetSession (context, false).getMaxInactiveInterval (); timeout = GetIntervalInMinutes (javaTimeoutInSeconds); ServletSessionStateItemCollection sessionState = new ServletSessionStateItemCollection (context); return new SessionStateStoreData ( sessionState, sessionState.StaticObjects, timeout); }
public override SessionStateStoreData CreateNewStoreData(HttpContext context, int timeout) { // we ignore this timeout and use web.xml settings. //must set now as this can be a last chance for ro item //GetSession (context, false).setMaxInactiveInterval (timeout * 60); int javaTimeoutInSeconds = GetSession(context, false).getMaxInactiveInterval(); timeout = GetIntervalInMinutes(javaTimeoutInSeconds); ServletSessionStateItemCollection sessionState = new ServletSessionStateItemCollection(context); return(new SessionStateStoreData( sessionState, sessionState.StaticObjects, timeout)); }
internal static HttpSessionStateContainer CreateContainer(HttpSession session) { ServletSessionStateItemCollection sessionState = session.getAttribute(J2EEConsts.SESSION_STATE) as ServletSessionStateItemCollection; if (sessionState == null) //was not set { sessionState = new ServletSessionStateItemCollection(null); } return(new HttpSessionStateContainer(session.getId(), sessionState, sessionState.StaticObjects, GetIntervalInMinutes(session.getMaxInactiveInterval()), session.isNew(), HttpCookieMode.AutoDetect, SessionStateMode.Custom, true)); }
public override SessionStateStoreData GetItem (HttpContext context, string id, out bool locked, out TimeSpan lockAge, out object lockId, out SessionStateActions actions) { locked = false; lockAge = TimeSpan.Zero; lockId = null; actions = SessionStateActions.None; if (id == null) return null; HttpSession session = GetSession (context, false, false); if (session == null) return null; ServletSessionStateItemCollection sessionState = session.getAttribute (J2EEConsts.SESSION_STATE) as ServletSessionStateItemCollection; if (sessionState == null) //was not set sessionState = new ServletSessionStateItemCollection (context); return new SessionStateStoreData ( sessionState, sessionState.StaticObjects, GetIntervalInMinutes(session.getMaxInactiveInterval ())); }
internal static HttpSessionStateContainer CreateContainer (HttpSession session) { ServletSessionStateItemCollection sessionState = session.getAttribute (J2EEConsts.SESSION_STATE) as ServletSessionStateItemCollection; if (sessionState == null) //was not set sessionState = new ServletSessionStateItemCollection (null); return new HttpSessionStateContainer (session.getId (), sessionState, sessionState.StaticObjects, GetIntervalInMinutes (session.getMaxInactiveInterval ()), session.isNew (), HttpCookieMode.AutoDetect, SessionStateMode.Custom, true); }