I have Oracle 11g2 on RedHat 5, with default installation of Oracle.
When I run the following test program, it takes up to 30 seconds to get a connection from the connection pool. The connection pool itself is created immediately. Subsequent createConnection calls from the same pool within the same program also take similar time.
If instead I try to get a connection directly, i.e., without using a connection pool, I get a connection without delay.
using namespace std;
environment = oracle::occi::Environment::createEnvironment(oracle::occi::Environment::DEFAULT);
connPool = environment->createConnectionPool("hr", "abcabc", "", 3, 5, 2);
con = connPool->createConnection("hr", "abcabc");