I've run into a strange problem.
When I initiate my database connections I see the following behavior:
1st connection from the pool is created instantly
all other connections are created really slowly, it seems every 5 second 1 new
connection gets connected.
When all connections are connected to the db, everything works like it should.
The waiting connection requests all are in the same state:
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1123)
- locked <0x0000000741c54170> (a
org.apache.commons.pool.impl.GenericObjectPool$Latch)
at
org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:180)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
It seems like one gets revived every 5 sec, and then connects to the db.
My question is if it is possible to change this internal wait of 5 sec?
Bernard