Resizing a connection pool with the defaultConnections() method does not work

Article ID: 1171
Last updated: 31 Jan, 2008
Article ID: 1171
Last updated: 31 Jan, 2008
Revision: 1
Views: 2738
Posted: 14 Jun, 2001
by Dean J.
Updated: 31 Jan, 2008
by Dean J.
Problem


When setting the the DBTools connection pool size with the RWDBDatabase::defaultConnections(size_t reqdConnections) method, the connection pool size does not change, and the size remains at the initial default value of 1. 


Cause


This issue is caused by incorrect logic in the poolable.cpp file in DBTools.


Action


This issue has been resolved in our SourcePro DB product, available through your sales representative. 

To work around this issue in your 4.x DBTools libraries, edit your existing poolable.cpp file to include the following function logic (see below), and recompile both the DBTools library and your application. The connection pool will now be resized as expected.

#code

size_t
RWDBConnectionPool::numberToRetain(size_t newValue)
{
    size_t oldValue = numberToRetain_;
    numberToRetain_ = newValue;
    return oldValue;
}

This article was:   Helpful | Not helpful
Report an issue
Article ID: 1171
Last updated: 31 Jan, 2008
Revision: 1
Views: 2738
Posted: 14 Jun, 2001 by Dean J.
Updated: 31 Jan, 2008 by Dean J.

Others in this category