Usually, connections in the pool are wrapped up in AS-specific implementation, which ensures that the client is too intrusive. When certain methods in a connection are called, it is considered dirty and cannot be returned to the pool, but closed and recreated instead, or reset to its original state, if possible. Frequently asked questions about how to deal with these situations, for example. Delete infected connections in Weblogic.
The effect of these self-cleaning can also depend on the driver. Therefore, I suggest you conduct a simple test with a 1-connection pool. Establish a connection with autocommit = false, do not close it, exit and try to use it with another client with a test that checks the actual state of the autocommit property.
Another thing to consider is that Connection.close () is that the AS shell does not close the connection, but puts it in the pool. Therefore, if the client disconnects before calling the close () function (and before setting the autorun back), the connection may not be available to other clients in the pool, creating a connection leak.
source share