示例#1
0
        public void sessionDestroyed(HttpSessionEvent se)
        {
            bool setDomain = [email protected]() == null;

            if (setDomain)
            {
                AppDomain servletDomain = (AppDomain)se.getSession().getServletContext().getAttribute(J2EEConsts.APP_DOMAIN);
                if (servletDomain == null)
                {
                    return;
                }
                [email protected](servletDomain);
            }
            try {
                HttpSessionStateContainer container =
                    ServletSessionStateStoreProvider.CreateContainer(se.getSession());

                SessionStateUtility.RaiseSessionEnd(container, this, EventArgs.Empty);
            }
            catch (Exception e) {
                Debug.WriteLine(e.Message);
                Debug.WriteLine(e.StackTrace);
            }
            finally {
                if (setDomain)
                {
                    [email protected]();
                }
            }
        }
示例#2
0
 public void RemoveSessionID(HttpContext context)
 {
     ServletSessionStateStoreProvider.GetSession(context, false).invalidate();
 }
示例#3
0
 public string CreateSessionID(HttpContext context)
 {
     return(ServletSessionStateStoreProvider.GetSession(context, true).getId());
 }