[mapguide-commits] r4574 - in sandbox/adsk/2.2gp: Common/MapGuideCommon/Services Server/src/Core Web/src

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Feb 2 18:13:03 EST 2010


Author: brucedechant
Date: 2010-02-02 18:13:01 -0500 (Tue, 02 Feb 2010)
New Revision: 4574

Modified:
   sandbox/adsk/2.2gp/Common/MapGuideCommon/Services/SiteManager.cpp
   sandbox/adsk/2.2gp/Server/src/Core/Server.cpp
   sandbox/adsk/2.2gp/Web/src/webconfig.ini
Log:
Fix for trac ticket 1131 - Load balancing doesn't support fail over
http://trac.osgeo.org/mapguide/ticket/1131

Notes:
- Turn on fail over retry background thread by default and disable it when running unit tests
- Adjust fail over retry time for web tier to correspond to a single MapGuide server instead of a multiple MapGuide server configuration


Modified: sandbox/adsk/2.2gp/Common/MapGuideCommon/Services/SiteManager.cpp
===================================================================
--- sandbox/adsk/2.2gp/Common/MapGuideCommon/Services/SiteManager.cpp	2010-02-01 21:31:09 UTC (rev 4573)
+++ sandbox/adsk/2.2gp/Common/MapGuideCommon/Services/SiteManager.cpp	2010-02-02 23:13:01 UTC (rev 4574)
@@ -125,6 +125,7 @@
     m_index(0)
 {
     Initialize();
+    StartCheckServersThread();
 }
 
 ///----------------------------------------------------------------------------

Modified: sandbox/adsk/2.2gp/Server/src/Core/Server.cpp
===================================================================
--- sandbox/adsk/2.2gp/Server/src/Core/Server.cpp	2010-02-01 21:31:09 UTC (rev 4573)
+++ sandbox/adsk/2.2gp/Server/src/Core/Server.cpp	2010-02-02 23:13:01 UTC (rev 4574)
@@ -283,6 +283,10 @@
 
         try
         {
+            // Let the site manager know that the check servers background thread needs to stop
+            MgSiteManager* siteManager = MgSiteManager::GetInstance();
+            siteManager->StopCheckServersThread();
+
             // Change the log file names to use the unit test names because we don't want to replace the existing log files
             MgLogManager* pLogManager = MgLogManager::GetInstance();
             STRING filename;
@@ -386,6 +390,10 @@
 
         try
         {
+            // Let the site manager know that the check servers background thread needs to stop
+            MgSiteManager* siteManager = MgSiteManager::GetInstance();
+            siteManager->StopCheckServersThread();
+
             // Change the log file names to use the unit test names because we don't want to replace the existing log files
             MgLogManager* pLogManager = MgLogManager::GetInstance();
             STRING filename;
@@ -547,10 +555,6 @@
                                     nResult = siteThreads.Activate();
                                     if(nResult == 0)
                                     {
-                                        // Let the site manager know that the check servers background thread needs to start
-                                        MgSiteManager* siteManager = MgSiteManager::GetInstance();
-                                        siteManager->StartCheckServersThread();
-
                                         MG_LOG_TRACE_ENTRY(L"MgServer::svc() - Before Event Loop");
                                         nResult = ACE_Reactor::instance()->run_reactor_event_loop();
                                         MG_LOG_TRACE_ENTRY(L"MgServer::svc() - After Event Loop");
@@ -586,6 +590,7 @@
                                         siteThreads.close();
 
                                         // Let the site manager know that the check servers background thread needs to stop
+                                        MgSiteManager* siteManager = MgSiteManager::GetInstance();
                                         siteManager->StopCheckServersThread();
 
                                         // Ensure the thread manager waits until all operation threads are done before closing

Modified: sandbox/adsk/2.2gp/Web/src/webconfig.ini
===================================================================
--- sandbox/adsk/2.2gp/Web/src/webconfig.ini	2010-02-01 21:31:09 UTC (rev 4573)
+++ sandbox/adsk/2.2gp/Web/src/webconfig.ini	2010-02-02 23:13:01 UTC (rev 4574)
@@ -43,11 +43,22 @@
 # TcpIpMtu                         The TCP/IP maximum transmission unit
 #                                       0 < Value <= 65535
 # TempPath                         Path where the temporary files are stored
+# FailoverRetryTime                Time in seconds for when to retry connecting
+#                                  to a MapGuide server that has gone offline.
+#                                  Note: For a single Web Tier and MapGuide server 
+#                                        pair use 1. For a load balanced 
+#                                        configuration with multiple MapGuide 
+#                                        servers use 60. Values other than 1 will 
+#                                        cause a delay when re-establishing a 
+#                                        connection with the Web Tier after 
+#                                        restarting a MapGuide server.
+#
 # *****************************************************************************
 DefaultMessageLocale               = en
 ResourcesPath                      = Resources/
 TcpIpMtu                           = 1460
 TempPath                           = Temp/
+FailoverRetryTime                  = 1
 
 [AdministrativeConnectionProperties]
 # *****************************************************************************



More information about the mapguide-commits mailing list