Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> occi connection pooling not working as expected
In a simple testprogram we face the issue that
new connectionS are not taken from the allocated connection pool but
newly created. We set min connection to 3 and see 3 initially but 4
after connectionPool->createConnection
This can be observed by counting and selectin in v$session. We changed
also connection between dedicated
and shared but no change in behaviour.
I have seen this problem reported before but no solution.
Also read an explanation about differences between connection and
session pooling but no solution,
It look more and more that there is a connectionPool but no method
to get the connection from this pool.
Is this true ? Is this not implemented in 9.2 ?
In 10.2 docs we see this method. Does it work only in this release?
Is it possible to use this occi, 10.2 against a 9.2.0.6 database ?
Migration is not really an option right now.
Any ideas are greatly appreciated.
Details: Oracle 9.2.0.6 OCCI HPUX 11.11
Tnx,
Jeroen
Testprogram used::
RWBoolean DatabaseGlobal::dbInitLib(RWCString userName, RWCString
password,
RWCString database, long maxConnections,
RWBoolean commitOn, char* module)
{
unsigned int minConn = 3;
unsigned int incrConn = 2;
if (!connPool) {
try {
connPool = env->createConnectionPool(userName.std(),
password.std(),
database.std(),
minConn,
maxConnections,
incrConn);
if (connPool) {
Connection *con = connPool->createConnection(userName.std(),
password.std());
Statement *stmt = con->createStatement(
"BEGIN dbms_application_info.set_module(:v1, :v2); END;");
stmt->setAutoCommit(commitOn); stmt->setString(1, module); stmt->setString(2, 0);
![]() |
![]() |