Author: kostat
Date: 2007-03-25 09:25:22 -0500 (Sun, 25 Mar 2007)
New Revision: 74960

Modified:
   trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseHttpServlet.cs
Log:
use servlet context to store the ping flag

Modified: trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseHttpServlet.cs
===================================================================
--- trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseHttpServlet.cs        
2007-03-25 13:48:38 UTC (rev 74959)
+++ trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseHttpServlet.cs        
2007-03-25 14:25:22 UTC (rev 74960)
@@ -49,7 +49,6 @@
                static readonly LocalDataStoreSlot _servletResponseSlot = 
Thread.GetNamedDataSlot(J2EEConsts.SERVLET_RESPONSE);
                static readonly LocalDataStoreSlot _servletSlot = 
Thread.GetNamedDataSlot(J2EEConsts.CURRENT_SERVLET);
 
-               string _ping = "0"; //used for logical pinging by IDE. Can be 
"0" or "1".
                bool _appVirDirInited = false;
                Field _derbyContextService;
                java.lang.ThreadLocal _derbyLocal;
@@ -159,12 +158,15 @@
                                        string requestURI = req.getRequestURI 
();
                                        bool getp = requestURI.EndsWith 
(getping, StringComparison.Ordinal);
                                        if (!getp && requestURI.EndsWith 
(setping, StringComparison.Ordinal)) {
-                                               _ping = "1";
+                                               getServletContext 
().setAttribute (getping, "1");
                                                getp = true;
                                        }
 
                                        if (getp) {
-                                               resp.getOutputStream ().print 
(_ping);
+                                               string ping = (string) 
getServletContext ().getAttribute (getping);
+                                               if (ping == null)
+                                                       ping = "0";
+                                               resp.getOutputStream ().print 
(ping);
                                                return;
                                        }
                                }

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

Reply via email to