Author: kostat
Date: 2006-03-20 09:04:29 -0500 (Mon, 20 Mar 2006)
New Revision: 58184

Modified:
   trunk/mcs/class/System.Web/System.Web.J2EE/ChangeLog
   trunk/mcs/class/System.Web/System.Web.J2EE/SessionListener.cs
Log:
Associate the AppDoamin with current thread

Modified: trunk/mcs/class/System.Web/System.Web.J2EE/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.J2EE/ChangeLog        2006-03-20 
14:01:27 UTC (rev 58183)
+++ trunk/mcs/class/System.Web/System.Web.J2EE/ChangeLog        2006-03-20 
14:04:29 UTC (rev 58184)
@@ -1,3 +1,7 @@
+2006-03-20  Konstantin Triger <[EMAIL PROTECTED]>
+
+       * SessionListener.cs: Associate the AppDoamin with current thread.
+
 2006-01-19  Konstantin Triger <[EMAIL PROTECTED]>
 
        * BaseHttpServlet.cs: call correct ServletWorkerRequest ctor

Modified: trunk/mcs/class/System.Web/System.Web.J2EE/SessionListener.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.J2EE/SessionListener.cs       
2006-03-20 14:01:27 UTC (rev 58183)
+++ trunk/mcs/class/System.Web/System.Web.J2EE/SessionListener.cs       
2006-03-20 14:04:29 UTC (rev 58184)
@@ -47,12 +47,14 @@
 
                public void sessionDestroyed(HttpSessionEvent se) 
                {
+                       object o  = 
se.getSession().getAttribute("GH_SESSION_STATE");
+                       if (o == null)
+                               return;
+                       AppDomain servletDomain = 
(AppDomain)se.getSession().getServletContext().getAttribute(J2EEConsts.APP_DOMAIN);
+                       [EMAIL PROTECTED](servletDomain);
                        try
                        {
                                bool  getHttpApplication = false;
-                               object o  = 
se.getSession().getAttribute("GH_SESSION_STATE");
-                               if (o == null)
-                                       return;
                                object app  = ((HttpSessionState)o).App;
                                if (app == null)
                                {
@@ -75,11 +77,17 @@
                                if (getHttpApplication)
                                        
HttpApplicationFactory.Recycle((HttpApplication)app);
                        }
+#if DEBUG
                        catch (Exception e)
                        {
                                Console.WriteLine(e.Message);
                                Console.WriteLine(e.StackTrace);
                        }
+#endif
+                       finally
+                       {
+                               [EMAIL PROTECTED]();
+                       }
                }
        }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to