####<Jun 7, 2011 6:58:18 AM PDT> <Warning> <JDBC> <localhost> <portalServer> <Finalizer> <<anonymous>> <> <BEA-001074> <A JDBC pool connection leak was detected. A connection leak occurs when a connection obtained from the pool was not closed explicitly by calling close() and then was disposed by the garbage collector and returned to the connection pool. The following stack trace at create shows where the leaked connection was created. Stack trace at connection create:
at weblogic.jdbc.jts.Driver.connect(Driver.java:147) weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java)
Weblogic server provides this capability to detect any such connection leak. It would print out the stacktrace of the calling method that retrieved the database connection from the pool but did not return it back.
Find the class based on stacktrace, review the code and to make sure the borrowed connection is returned back to the pool always. At times, this happens because the return to Pool is not called or return to Pool method does not get called because of an exception that alter the flow. In order to avoid this make sure you use a finally block to return the borrowed connection back all the time.