The finalize method migth not be called until tomcat is shut down.
Recommended actions:
- Use a connection pool
- Request the connection as close as possible to the usage
- Return the connection as soon as possible after the usage
- Always use a pattern like 
  Connection mCon = null;
  try {
    mCon = mPool.getConnection(); 
    // The exact code depends on the implemenation of the pool
  } catch (...) {
  } finally {
    mPool.releaseConnection(mCon);
    // The exact code depends on the implemenation of the pool
    // if you have to catch Exception or to make shure that
    // mCon != null and if you need transactions
  }

> -----Ursprüngliche Nachricht-----
> Von: Christian J. Dechery [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 11. Juni 2002 15:33
> An: [EMAIL PROTECTED]
> Betreff: problem with connections not closing...
> 
> I've even debugged it, there are some JSPs that opens like 4 
> connections, and in my finalize() method there's a 
> con.close() call, never all the 4 con.close() are 
> successfull, there's always at least one that fails and gives 
> an execption. I don't know why.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to