Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] ConnectionPool: JDBC_CONNECTIONS_WAIT/CONNECTION_POOL_WAIT is not working as expected

Hello,

I'm trying to set a timeout for aquiring a database connection from the connection pool, by setting  PersistenceUnitProperties. JDBC_CONNECTIONS_WAIT, but it doesn't have any effect.
When all connections are used, the next query still waits indefinitely until a connection is released.
I was expecting an exception after the timeout.

I'm using EclipseLinks own connection pool :
http://git.eclipse.org/c/eclipselink/eclipselink.runtime.git/tree/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/sessions/server/ConnectionPool.java
When looking at acquireConnection() it becomes clear, that it can't work as I'm expecting.
After waiting for the timeout-interval, the method retries to acquire a connection. When this isn't successful, it is waiting again instead of throwing an exception.
Debugging confirmed, that my JDBC_CONNECTIONS_WAIT value is  used as ConnectionPool.waitTimeout.

Is this a bug, or am I missing something?

Ronny



Back to the top