瀏覽代碼

Use standard mechanism for session_end handling

svn path=/trunk/mcs/; revision=58744
Konstantin Triger 20 年之前
父節點
當前提交
e93e8a2c1e

+ 4 - 0
mcs/class/System.Web/System.Web.J2EE/ChangeLog

@@ -1,3 +1,7 @@
+2006-03-29  Konstantin Triger <[email protected]>
+
+	* SessionListener.cs: Use standard mechanism for session_end handling.
+
 2006-03-20  Konstantin Triger <[email protected]>
 
 	* SessionListener.cs: Associate the AppDoamin with current thread.

+ 1 - 22
mcs/class/System.Web/System.Web.J2EE/SessionListener.cs

@@ -54,28 +54,7 @@ namespace System.Web.J2EE
 			[email protected](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)