Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> occi connection pooling not working as expected

occi connection pooling not working as expected

From: <vansluisdamster_at_gmail.com>
Date: 3 Aug 2006 03:00:46 -0700
Message-ID: <1154599245.982701.147060@s13g2000cwa.googlegroups.com>


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);

int updateCount = stmt->executeUpdate(); con->terminateStatement(stmt);
connPool->terminateConnection(con);
return TRUE;
}

else {
return FALSE;
}
}

catch (SQLException e) {
cout << e.getMessage() << endl;
}
}

else {
return FALSE;
}

return FALSE;
}
Received on Thu Aug 03 2006 - 05:00:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US