Breaking News
Home / ServerSide / Weblogic / Weblogic Connection Pool Leak Issue

Weblogic Connection Pool Leak Issue

Issue

####<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.wrapper.JTSConnection.initCopy(JTSConnection.java:201)
        at weblogic.jdbc.jts.Driver.copyConnection(Driver.java:277)
        at weblogic.jdbc.jts.Driver.copyLocalConnection(Driver.java:257)
        at weblogic.jdbc.jts.Driver.connect(Driver.java:147)      weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java)
        at com.service.base.util.ServiceLocator.getConnection(ServiceLocator.java:27)
        at com.service.dao.BaseDAO.initDAO(BaseDAO.java:150)

Analysis

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.

[pb_builder]

Check Also

Error – Remote side declared peer gone on this JVM

Issue When trying to sent a JMS message to a remote Weblogic Application Server the …

Advertisment ad adsense adlogger