Use standard mechanism for session_end handling
authorKonstantin Triger <kostat@mono-cvs.ximian.com>
Wed, 29 Mar 2006 17:08:29 +0000 (17:08 -0000)
committerKonstantin Triger <kostat@mono-cvs.ximian.com>
Wed, 29 Mar 2006 17:08:29 +0000 (17:08 -0000)
svn path=/trunk/mcs/; revision=58744

mcs/class/System.Web/System.Web.J2EE/ChangeLog
mcs/class/System.Web/System.Web.J2EE/SessionListener.cs

index d816993e709bf5761ecc178f74eb9df7be758d5f..36526174c29b23c669c6030feb56ca4a306c9b64 100644 (file)
@@ -1,3 +1,7 @@
+2006-03-29  Konstantin Triger <kostat@mainsoft.com>\r
+\r
+       * SessionListener.cs: Use standard mechanism for session_end handling.\r
+\r
 2006-03-20  Konstantin Triger <kostat@mainsoft.com>\r
 \r
        * SessionListener.cs: Associate the AppDoamin with current thread.\r
index bca4b22820d0df00f843a57b8df9e52e8ab7f6bd..cd34ee6855b6bbb1e997b3a00092ea96bfd0bc05 100644 (file)
@@ -54,28 +54,7 @@ namespace System.Web.J2EE
                        vmw.@internal.EnvironmentUtils.setAppDomain(servletDomain);
                        try
                        {
-                               bool  getHttpApplication = false;
-                               object app  = ((HttpSessionState)o).App;
-                               if (app == null)
-                               {
-                                       app = HttpApplicationFactory.GetApplication(null);
-                                       if (app == null)
-                                               return;
-                                       getHttpApplication = true;
-                               }
-                               if (method == null && firstTime)
-                               {
-                                       firstTime = false;
-                                       Type appType = app.GetType();
-                                       method = appType.GetMethod("Session_End",BindingFlags.Instance|BindingFlags.NonPublic|BindingFlags.Public);
-                                       if (method == null)
-                                               return;
-                               }
-                               else if (method == null)
-                                       return;
-                               method.Invoke(app, new object[]{app,EventArgs.Empty});
-                               if (getHttpApplication)
-                                       HttpApplicationFactory.Recycle((HttpApplication)app);
+                               HttpApplicationFactory.InvokeSessionEnd(o);
                        }
 #if DEBUG
                        catch (Exception e)