----- Original Message ----- From: "Johnny Kewl" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, September 16, 2008 5:17 PM
Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....



----- Original Message ----- From: "sinoea kaabi" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, September 16, 2008 5:10 PM
Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....



Yes, as I said in the first post, that I have checked through all the code, and I am closing all the connections (in a finally block) after they have been used.


final Connection connection = datasource.getConnection();
try {

============================
BUT you have a
**** return branches; ****
HERE


It can never get to HERE

Just put the return after the finally....
============================
blah .. blah
} finally {
  connection.close();
}

sinoea
in the context of exceptions.... finally is always run... exception or not...
BUT...
you still have to let the program get there....
... you returning too early.... the connections are not closing...

Have fun...
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to