[mapguide-commits] r4575 - in trunk/MgDev:
Common/MapGuideCommon/Services Server/src/Core Web/src
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Feb 2 19:00:29 EST 2010
Author: brucedechant
Date: 2010-02-02 19:00:29 -0500 (Tue, 02 Feb 2010)
New Revision: 4575
Modified:
trunk/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp
trunk/MgDev/Server/src/Core/Server.cpp
trunk/MgDev/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: trunk/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp 2010-02-02 23:13:01 UTC (rev 4574)
+++ trunk/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp 2010-02-03 00:00:29 UTC (rev 4575)
@@ -125,6 +125,7 @@
m_index(0)
{
Initialize();
+ StartCheckServersThread();
}
///----------------------------------------------------------------------------
Modified: trunk/MgDev/Server/src/Core/Server.cpp
===================================================================
--- trunk/MgDev/Server/src/Core/Server.cpp 2010-02-02 23:13:01 UTC (rev 4574)
+++ trunk/MgDev/Server/src/Core/Server.cpp 2010-02-03 00:00:29 UTC (rev 4575)
@@ -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: trunk/MgDev/Web/src/webconfig.ini
===================================================================
--- trunk/MgDev/Web/src/webconfig.ini 2010-02-02 23:13:01 UTC (rev 4574)
+++ trunk/MgDev/Web/src/webconfig.ini 2010-02-03 00:00:29 UTC (rev 4575)
@@ -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