Reputation: 389
I'm dealing with a issue with the Oracle UCP manager using Oracle ojdbc 12 and Java 8. Whan a UCP pool startup fails, I want the connections it created to be closed.
When the ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit error is encountered during pool initialization, for instance when the initPoolSize value is too large, the startConnectionPool API throws an exception and the pool state is FAILED. This is the expected behavior.
However, calling stopConnectionPool() brings the pool state to STOPPED without actually closing any connection. I see the local connections using netstat, and on the server v$sessions.
My hunch is that, as the documentation mentions (https://docs.oracle.com/cd/E18283_01/java.112/e12265/manage.htm) stopping the pool should only work while it is in STARTING or STARTED/RUNNING state. But in that case stopConnectionPool() should propably throw an error, which is not what I see.
So the question is: Is the stopConnectionPool() UCP API supposed to work on a FAILED pool ?
Maybe the only way out is to destroy the pool?
Upvotes: 1
Views: 560
Reputation: 11
The 'stopConnectionPool()' does nothing only in case if a pool object is already in a "stopped" life cycle. In all other cases this manager's call should stop the pool closing all opened connections. If you still see opened connections in the described case, please prepare the small application that reproduces the reported behavior and contact Oracle.
Upvotes: 1