Discussions

EJB programming & troubleshooting: Connection leak in weblogic5.1

  1. Connection leak in weblogic5.1 (2 messages)

    Hi All,
           we are facing a problem of connection leaks in our production server. we have identified the beans where we have not closed the connections and we have closed them , but still we are facing the problem of connection leaks. Does weblogic5.1 server close the connection automatically when connection object goes out of method execution scope. what can be the other areas where we can predict the cause of connection leak, a part from not closing a connection.
    we are using weblogic5.1(service pack 12)

    Regards
    Srinivas Masam
  2. Connection leak in weblogic5.1[ Go to top ]

    The connection will be closed when it is garbage collected.

    Unfortunately this may not happen for a while and you can not force it to happen.

    Therefore you should always close connections in a finally block. This is pretty standard practice.

    David
  3. Yes. We had the same problem before.
    I wrote the code to close the connection in finally {} block.

    Now while connection is open and something is executing, the request is abondoned by the user by aborting the request. What happens in this case ?

    Long back, I initiated a request with BEA in implementing a connection timeout, which releases a connection when a connection is idle for x number of seconds.

    www.bitmechanic.com connection pool mechanism implements this kind of functionality.