[mapguide-commits] r6746 - trunk/MgDev/Server/src/Common/Manager
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Jun 11 03:24:44 PDT 2012
Author: hubu
Date: 2012-06-11 03:24:43 -0700 (Mon, 11 Jun 2012)
New Revision: 6746
Modified:
trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp
Log:
Submit On behalf of Andy Zhang
Fdo Connection Manager updates:
#1998: Fix 'no more connections' error.
Modified: trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp
===================================================================
--- trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp 2012-06-11 09:55:40 UTC (rev 6745)
+++ trunk/MgDev/Server/src/Common/Manager/FdoConnectionManager.cpp 2012-06-11 10:24:43 UTC (rev 6746)
@@ -247,7 +247,10 @@
{
// If current connections count is equal to the pool size of the provider, we cannot create new connection.
// But if it is a PerCommandThreaded/MultiThreaded provider, we can reuse existing connections.
- reuseOnly = (providerInfo->GetCurrentConnections() == providerInfo->GetPoolSize());
+ reuseOnly = (providerInfo->GetCurrentConnections() == providerInfo->GetPoolSize() &&
+ ((providerInfo->GetThreadModel() == FdoThreadCapability_PerCommandThreaded) ||
+ (providerInfo->GetThreadModel() == FdoThreadCapability_MultiThreaded)));
+
if(m_bFdoConnectionPoolEnabled)
{
// Search the cache for an FDO connection matching this resourceIdentifier
@@ -415,7 +418,9 @@
{
// If current connections count is equal to the pool size of the provider, we cannot create new connection.
// But if it is a PerCommandThreaded/MultiThreaded provider, we can reuse existing connections.
- reuseOnly = (providerInfo->GetCurrentConnections() == providerInfo->GetPoolSize());
+ reuseOnly = (providerInfo->GetCurrentConnections() == providerInfo->GetPoolSize() &&
+ ((providerInfo->GetThreadModel() == FdoThreadCapability_PerCommandThreaded) ||
+ (providerInfo->GetThreadModel() == FdoThreadCapability_MultiThreaded)));
if(m_bFdoConnectionPoolEnabled)
{
More information about the mapguide-commits
mailing list