[mapguide-commits] r1134 - in trunk/MgDev: Common/MapGuideCommon/System Server/src/Services/Resource

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Feb 23 14:01:55 EST 2007


Author: stevedang
Date: 2007-02-23 14:01:55 -0500 (Fri, 23 Feb 2007)
New Revision: 1134

Modified:
   trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
   trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h
   trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp
   trunk/MgDev/Server/src/Services/Resource/ServerResourceService.cpp
   trunk/MgDev/Server/src/Services/Resource/ServerResourceService.h
Log:
Updated resource service with RetryAttempts/RetryInterval configurable settings to ease database access performance tuning.

Modified: trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp	2007-02-23 18:53:06 UTC (rev 1133)
+++ trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.cpp	2007-02-23 19:01:55 UTC (rev 1134)
@@ -147,7 +147,7 @@
 const STRING MgConfigProperties::DefaultGeneralPropertyWfsDocumentPath                      = L"Wfs/";
 const STRING MgConfigProperties::GeneralPropertyWmsDocumentPath                             = L"WmsDocumentPath";
 const STRING MgConfigProperties::DefaultGeneralPropertyWmsDocumentPath                      = L"Wms/";
-const STRING MgConfigProperties::GeneralPropertyWorkerThreadPoolSize                        = L"WorkerThreadPoolSize";
+const STRING MgConfigProperties::GeneralPropertyWorkerThreadPoolSize                        = L"WorkerThreadPoolSize"; // for internal use only
 const INT32  MgConfigProperties::DefaultGeneralPropertyWorkerThreadPoolSize                 = 10;
 
 // ******************************************************************
@@ -289,14 +289,18 @@
 const INT32  MgConfigProperties::DefaultResourceServicePropertyResourcePermissionCacheSize      = 1000;
 const STRING MgConfigProperties::ResourceServicePropertyResourceSchemaFilePath                  = L"ResourceSchemaFilePath";
 const STRING MgConfigProperties::DefaultResourceServicePropertyResourceSchemaFilePath           = L"Schema/";
-const STRING MgConfigProperties::ResourceServicePropertyResourceValidationEnabled               = L"ResourceValidationEnabled"; // for internal use only
-const bool   MgConfigProperties::DefaultResourceServicePropertyResourceValidationEnabled        = true;
 const STRING MgConfigProperties::ResourceServicePropertySessionRepositoryPath                   = L"SessionRepositoryPath";
 const STRING MgConfigProperties::DefaultResourceServicePropertySessionRepositoryPath            = L"Repositories/Session/";
 const STRING MgConfigProperties::ResourceServicePropertySessionResourceDataFilePath             = L"SessionResourceDataFilePath";
 const STRING MgConfigProperties::DefaultResourceServicePropertySessionResourceDataFilePath      = L"Repositories/Session/DataFiles/";
 const STRING MgConfigProperties::ResourceServicePropertySiteRepositoryPath                      = L"SiteRepositoryPath";
 const STRING MgConfigProperties::DefaultResourceServicePropertySiteRepositoryPath               = L"Repositories/Site/";
+const STRING MgConfigProperties::ResourceServicePropertyResourceValidationEnabled               = L"ResourceValidationEnabled"; // for internal use only
+const bool   MgConfigProperties::DefaultResourceServicePropertyResourceValidationEnabled        = true;
+const STRING MgConfigProperties::ResourceServicePropertyRetryAttempts                           = L"RetryAttempts";             // for internal use only
+const INT32  MgConfigProperties::DefaultResourceServicePropertyRetryAttempts                    = 10;
+const STRING MgConfigProperties::ResourceServicePropertyRetryInterval                           = L"RetryInterval";             // for internal use only
+const INT32  MgConfigProperties::DefaultResourceServicePropertyRetryInterval                    = 10;
 
 // ******************************************************************
 // Site Service Properties
@@ -319,11 +323,11 @@
 const INT32 MgConfigProperties::DefaultTileServicePropertyTileColumnsPerFolder              = 30;
 const STRING MgConfigProperties::TileServicePropertyTileRowsPerFolder                       = L"TileRowsPerFolder";
 const INT32 MgConfigProperties::DefaultTileServicePropertyTileRowsPerFolder                 = 30;
-const STRING MgConfigProperties::TileServicePropertyCreationCutoffTime                      = L"CreationCutoffTime";
+const STRING MgConfigProperties::TileServicePropertyCreationCutoffTime                      = L"CreationCutoffTime";// for internal use only
 const INT32  MgConfigProperties::DefaultTileServicePropertyCreationCutoffTime               = 120;
-const STRING MgConfigProperties::TileServicePropertyPollingInterval                         = L"PollingInterval";
+const STRING MgConfigProperties::TileServicePropertyPollingInterval                         = L"PollingInterval";   // for internal use only
 const INT32  MgConfigProperties::DefaultTileServicePropertyPollingInterval                  = 1;
-const STRING MgConfigProperties::TileServicePropertyTiledMapCacheSize                       = L"TiledMapCacheSize";
+const STRING MgConfigProperties::TileServicePropertyTiledMapCacheSize                       = L"TiledMapCacheSize"; // for internal use only
 const INT32  MgConfigProperties::DefaultTileServicePropertyTiledMapCacheSize                = 10;
 
 // ******************************************************************
@@ -538,10 +542,12 @@
     { MgConfigProperties::ResourceServicePropertyResourceDataFileTrashFolderName    , MgPropertyType::String    , MG_CONFIG_MIN_FOLDER_NAME_LENGTH      , MG_CONFIG_MAX_FOLDER_NAME_LENGTH      , MG_CONFIG_FOLDER_NAME_RESERVED_CHARACTERS },
     { MgConfigProperties::ResourceServicePropertyResourcePermissionCacheSize        , MgPropertyType::Int32     , MG_CONFIG_MIN_CACHE_SIZE              , MG_CONFIG_MAX_CACHE_SIZE              , L""                                       },
     { MgConfigProperties::ResourceServicePropertyResourceSchemaFilePath             , MgPropertyType::String    , MG_CONFIG_MIN_PATH_LENGTH             , MG_CONFIG_MAX_PATH_LENGTH             , MG_CONFIG_PATH_RESERVED_CHARACTERS        },
-    { MgConfigProperties::ResourceServicePropertyResourceValidationEnabled          , MgPropertyType::Boolean   , 0                                     , 1                                     , L""                                       },
     { MgConfigProperties::ResourceServicePropertySessionRepositoryPath              , MgPropertyType::String    , MG_CONFIG_MIN_PATH_LENGTH             , MG_CONFIG_MAX_PATH_LENGTH             , MG_CONFIG_PATH_RESERVED_CHARACTERS        },
     { MgConfigProperties::ResourceServicePropertySessionResourceDataFilePath        , MgPropertyType::String    , MG_CONFIG_MIN_PATH_LENGTH             , MG_CONFIG_MAX_PATH_LENGTH             , MG_CONFIG_PATH_RESERVED_CHARACTERS        },
     { MgConfigProperties::ResourceServicePropertySiteRepositoryPath                 , MgPropertyType::String    , MG_CONFIG_MIN_PATH_LENGTH             , MG_CONFIG_MAX_PATH_LENGTH             , MG_CONFIG_PATH_RESERVED_CHARACTERS        },
+    { MgConfigProperties::ResourceServicePropertyResourceValidationEnabled          , MgPropertyType::Boolean   , 0                                     , 1                                     , L""                                       },
+    { MgConfigProperties::ResourceServicePropertyRetryAttempts                      , MgPropertyType::Int32     , 0                                     , 1000                                  , L""                                       },
+    { MgConfigProperties::ResourceServicePropertyRetryInterval                      , MgPropertyType::Int32     , 0                                     , 60000                                 , L""                                       },
     { L""                                                                           , 0                         , 0.0                                   , 0.0                                   , L""                                       }
 };
 

Modified: trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h	2007-02-23 18:53:06 UTC (rev 1133)
+++ trunk/MgDev/Common/MapGuideCommon/System/ConfigProperties.h	2007-02-23 19:01:55 UTC (rev 1134)
@@ -364,6 +364,14 @@
     static const STRING ResourceServicePropertyResourceValidationEnabled;       /// value("ResourceValidationEnabled")
     static const bool DefaultResourceServicePropertyResourceValidationEnabled;  /// value(true)
 
+    /// Sets the number of retry attempts per operation
+    static const STRING ResourceServicePropertyRetryAttempts;                   /// value("RetryAttempts")
+    static const INT32 DefaultResourceServicePropertyRetryAttempts;             /// value(10)
+
+    /// Sets the time duration (in milliseconds) between retry attempts
+    static const STRING ResourceServicePropertyRetryInterval;                   /// value("RetryInterval")
+    static const INT32 DefaultResourceServicePropertyRetryInterval;             /// value(10)
+
 EXTERNAL_API:
 
     /// Sets the root of the session repository

Modified: trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp	2007-02-23 18:53:06 UTC (rev 1133)
+++ trunk/MgDev/Server/src/Services/Resource/ApplicationRepositoryManager.cpp	2007-02-23 19:01:55 UTC (rev 1134)
@@ -1471,4 +1471,4 @@
     destResourceTags = destTagMan.GetTags();
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgApplicationRepositoryManager.CopyResourceData")
-}
\ No newline at end of file
+}

Modified: trunk/MgDev/Server/src/Services/Resource/ServerResourceService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ServerResourceService.cpp	2007-02-23 18:53:06 UTC (rev 1133)
+++ trunk/MgDev/Server/src/Services/Resource/ServerResourceService.cpp	2007-02-23 19:01:55 UTC (rev 1134)
@@ -27,7 +27,8 @@
 #include "SiteResourceContentManager.h"
 #include "UnmanagedDataManager.h"
 
-const int MgServerResourceService::sm_maxOpRetries = 10;
+INT32 MgServerResourceService::sm_retryAttempts = 10;
+ACE_Time_Value MgServerResourceService::sm_retryInterval;
 
 MgSiteRepository*    MgServerResourceService::sm_siteRepository    = NULL;
 MgSessionRepository* MgServerResourceService::sm_sessionRepository = NULL;
@@ -80,8 +81,7 @@
             throw;                                                            \
         }                                                                     \
                                                                               \
-        ACE_Time_Value timeValue(0, 10000);                                   \
-        ACE_OS::sleep(timeValue);                                             \
+        ACE_OS::sleep(sm_retryInterval);                                      \
     }                                                                         \
                                                                               \
     repositoryMan->Terminate();                                               \
@@ -118,6 +118,26 @@
 
     ACE_ASSERT(NULL == sm_siteRepository && NULL == sm_sessionRepository && NULL == sm_libraryRepository);
 
+    // Initialize performance tuning settings.
+
+    INT32 retryInterval = 10; // in milliseconds
+    MgConfiguration* configuration = MgConfiguration::GetInstance();
+    assert(NULL != configuration);
+
+    configuration->GetIntValue(
+        MgConfigProperties::ResourceServicePropertiesSection,
+        MgConfigProperties::ResourceServicePropertyRetryAttempts,
+        sm_retryAttempts,
+        MgConfigProperties::DefaultResourceServicePropertyRetryAttempts);
+
+    configuration->GetIntValue(
+        MgConfigProperties::ResourceServicePropertiesSection,
+        MgConfigProperties::ResourceServicePropertyRetryInterval,
+        retryInterval,
+        MgConfigProperties::DefaultResourceServicePropertyRetryInterval);
+
+    sm_retryInterval.msec((long)retryInterval);
+
     // Clean up the Session repository after creating the Site repository
     // to eliminate unnecessary XMLPlatformUtils::Initialize/Terminate calls
     // made by the BDB XmlManager.
@@ -227,7 +247,7 @@
 
     byteReader = repositoryMan->EnumerateRepositories();
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.EnumerateRepositories")
 
@@ -266,7 +286,7 @@
     ACE_ASSERT(!resource->GetRepositoryName().empty());
     auto_ptr<MgSessionRepositoryManager> repositoryMan(
         new MgSessionRepositoryManager(*sm_sessionRepository));
-    int maxRetries = sm_maxOpRetries;
+    int maxRetries = sm_retryAttempts;
 
     if ((NULL != content && !content->IsRewindable())
      || (NULL != header  && !header->IsRewindable()))
@@ -329,7 +349,7 @@
 
     repositoryMan->DeleteRepository(resource);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     // Update the current set of changed resources.
     UpdateChangedResources(repositoryMan->GetChangedResources());
@@ -362,7 +382,7 @@
 
     auto_ptr<MgApplicationRepositoryManager> repositoryMan(
         CreateApplicationRepositoryManager(resource));
-    int maxRetries = sm_maxOpRetries;
+    int maxRetries = sm_retryAttempts;
 
     if ((NULL != content && !content->IsRewindable())
      || (NULL != header  && !header->IsRewindable()))
@@ -422,7 +442,7 @@
 
     byteReader = repositoryMan->GetRepositoryContent(resource);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.GetRepositoryContent")
 
@@ -470,7 +490,7 @@
 
     byteReader = repositoryMan->GetRepositoryHeader(resource);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.GetRepositoryHeader")
 
@@ -496,7 +516,7 @@
 
     auto_ptr<MgLibraryRepositoryManager> repositoryMan(
         new MgLibraryRepositoryManager(*sm_libraryRepository));
-    int maxRetries = sm_maxOpRetries;
+    int maxRetries = sm_retryAttempts;
 
     if (!packageStream->IsRewindable())
     {
@@ -548,7 +568,7 @@
 
     repositoryMan->LoadResourcePackage(packagePathname, logActivities);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     // Update the current set of changed resources.
     UpdateChangedResources(repositoryMan->GetChangedResources());
@@ -598,7 +618,7 @@
     repositoryMan->MakeResourcePackage(resource, packagePathname, 
         packageDescription, logActivities);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.MakeResourcePackage")
 }
@@ -646,7 +666,7 @@
     byteReader = repositoryMan->EnumerateResources(resource, depth, type,
         properties, fromDate, toDate);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.EnumerateResources")
 
@@ -678,7 +698,7 @@
 
     auto_ptr<MgApplicationRepositoryManager> repositoryMan(
         CreateApplicationRepositoryManager(resource));
-    int maxRetries = sm_maxOpRetries;
+    int maxRetries = sm_retryAttempts;
 
     if ((NULL != content && !content->IsRewindable())
      || (NULL != header  && !header->IsRewindable()))
@@ -737,7 +757,7 @@
 
     repositoryMan->DeleteResource(resource);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     // Update the current set of changed resources.
     UpdateChangedResources(repositoryMan->GetChangedResources());
@@ -775,7 +795,7 @@
 
     repositoryMan->MoveResource(sourceResource, destResource, overwrite);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     // Update the current set of changed resources.
     UpdateChangedResources(repositoryMan->GetChangedResources());
@@ -813,7 +833,7 @@
 
     repositoryMan->CopyResource(sourceResource, destResource, overwrite);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     // Update the current set of changed resources.
     UpdateChangedResources(repositoryMan->GetChangedResources());
@@ -853,7 +873,7 @@
 
     byteReader = repositoryMan->GetResourceContent(resource, preProcessTags);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.GetResourceContent")
 
@@ -899,7 +919,7 @@
 
     byteReader = repositoryMan->GetResourceHeader(resource);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.GetResourceHeader")
 
@@ -948,7 +968,7 @@
 
     dateTime = repositoryMan->GetResourceModifiedDate(resource);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.GetResourceModifiedDate")
 
@@ -987,7 +1007,7 @@
 
     byteReader = repositoryMan->EnumerateReferences(resource);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.EnumerateReferences")
 
@@ -1144,7 +1164,7 @@
 
     repositoryMan->ChangeResourceOwner(resource, owner, includeDescendants);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.ChangeResourceOwner")
 }
@@ -1188,7 +1208,7 @@
 
     repositoryMan->InheritPermissionsFrom(resource);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.InheritPermissionsFrom")
 }
@@ -1225,7 +1245,7 @@
 
     byteReader = repositoryMan->EnumerateResourceData(resource);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.EnumerateResourceData")
 
@@ -1257,7 +1277,7 @@
 
     auto_ptr<MgApplicationRepositoryManager> repositoryMan(
         CreateApplicationRepositoryManager(resource));
-    int maxRetries = sm_maxOpRetries;
+    int maxRetries = sm_retryAttempts;
 
     if (!data->IsRewindable())
     {
@@ -1311,7 +1331,7 @@
 
     repositoryMan->DeleteResourceData(resource, dataName);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     // Update the current set of changed resources.
     UpdateChangedResources(repositoryMan->GetChangedResources());
@@ -1349,7 +1369,7 @@
 
     repositoryMan->RenameResourceData(resource, oldDataName, newDataName, overwrite);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     // Update the current set of changed resources.
     UpdateChangedResources(repositoryMan->GetChangedResources());
@@ -1391,7 +1411,7 @@
     byteReader = repositoryMan->GetResourceData(resource, dataName,
         preProcessTags);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.GetResourceData")
 
@@ -1467,7 +1487,7 @@
     byteReader = repositoryMan->EnumerateUsers(group, role, includePassword,
         includeGroups);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.EnumerateUsers")
 
@@ -1498,7 +1518,7 @@
 
     repositoryMan->AddUser(userId, username, password, description);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.AddUser")
 }
@@ -1526,7 +1546,7 @@
 
     repositoryMan->DeleteUsers(users);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.DeleteUsers")
 }
@@ -1555,7 +1575,7 @@
 
     repositoryMan->UpdateUser(userId, newUserId, newUsername, newPassword, newDescription);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.UpdateUser")
 }
@@ -1587,7 +1607,7 @@
 
     byteReader = repositoryMan->EnumerateGroups(user, role);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.EnumerateGroups")
 
@@ -1616,7 +1636,7 @@
 
     repositoryMan->AddGroup(group, description);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.AddGroup")
 }
@@ -1643,7 +1663,7 @@
 
     repositoryMan->DeleteGroups(groups);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.DeleteGroups")
 }
@@ -1672,7 +1692,7 @@
 
     repositoryMan->UpdateGroup(group, newGroup, newDescription);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.UpdateGroup")
 }
@@ -1710,7 +1730,7 @@
 
     repositoryMan->GrantGroupMembershipsToUsers(groups, users);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.GrantGroupMembershipsToUsers")
 }
@@ -1748,7 +1768,7 @@
 
     repositoryMan->RevokeGroupMembershipsFromUsers(groups, users);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.RevokeGroupMembershipsFromUsers")
 }
@@ -1794,7 +1814,7 @@
 
     roles = repositoryMan->EnumerateRoles(user, group);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.EnumerateRoles")
 
@@ -1860,7 +1880,7 @@
 
     repositoryMan->GrantRoleMembershipsToUsers( roles, users );
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.GrantRoleMembershipsToUsers")
 }
@@ -1898,7 +1918,7 @@
 
     repositoryMan->RevokeRoleMembershipsFromUsers( roles, users );
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.RevokeRoleMembershipsFromUsers")
 }
@@ -1936,7 +1956,7 @@
 
     repositoryMan->GrantRoleMembershipsToGroups( roles, groups );
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.GrantRoleMembershipsToGroups")
 }
@@ -1974,7 +1994,7 @@
 
     repositoryMan->RevokeRoleMembershipsFromGroups( roles, groups );
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH_AND_THROW(L"MgServerResourceService.RevokeRoleMembershipsFromGroups")
 }
@@ -2062,7 +2082,7 @@
 
     permitted = resourceContentMan->CheckPermission(*resource, permission);
 
-    MG_RESOURCE_SERVICE_END_OPERATION(sm_maxOpRetries)
+    MG_RESOURCE_SERVICE_END_OPERATION(sm_retryAttempts)
 
     MG_RESOURCE_SERVICE_CATCH(L"MgServerResourceService.HasPermission")
 

Modified: trunk/MgDev/Server/src/Services/Resource/ServerResourceService.h
===================================================================
--- trunk/MgDev/Server/src/Services/Resource/ServerResourceService.h	2007-02-23 18:53:06 UTC (rev 1133)
+++ trunk/MgDev/Server/src/Services/Resource/ServerResourceService.h	2007-02-23 19:01:55 UTC (rev 1134)
@@ -178,7 +178,8 @@
 
 private:
 
-    static const int sm_maxOpRetries;
+    static INT32 sm_retryAttempts;
+    static ACE_Time_Value sm_retryInterval;
 
     static MgSiteRepository*    sm_siteRepository;
     static MgSessionRepository* sm_sessionRepository;



More information about the mapguide-commits mailing list