Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 21740 invoked from network); 24 Mar 2005 07:53:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Mar 2005 07:53:09 -0000 Received: (qmail 55634 invoked by uid 500); 24 Mar 2005 07:53:08 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 55612 invoked by uid 500); 24 Mar 2005 07:53:07 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 55597 invoked by uid 99); 24 Mar 2005 07:53:07 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.seitenbau.net (HELO mail.seitenbau.net) (194.175.229.106) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 23 Mar 2005 23:53:04 -0800 Received: from [195.127.188.18] (helo=www.seitenbau.net) by router1.seitenbau.net with esmtp (Exim 4.43) id 1DEN9U-00050G-S6 for torque-user@db.apache.org; Thu, 24 Mar 2005 08:53:13 +0100 In-Reply-To: Subject: RE: DB Connections are not being closed... To: "Apache Torque Users List" X-Mailer: Lotus Notes Release 6.0 September 26, 2002 Message-ID: From: Thomas Fischer Date: Thu, 24 Mar 2005 08:52:59 +0100 X-MIMETrack: Serialize by Router on www/seitenbau(Release 6.5.1|January 21, 2004) at 24.03.2005 08:52:59 AM MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, if you do not open any connection explicitly, Torque makes sure that th= e connections are closed. If you open connections explicitly, make sure that they are closed afterwards. A secure way is doing it like this. Connection connection =3D null; try { connection =3D Torque.getConnection(); // do whatever you want with the connection Torque.closeConnection(connection); connection =3D null; } finally { if (connection !=3D null) { try { Torque.closeConnection(connection); } catch (Exception e) {} connection =3D null; } } Also, only store connections in local variables in order not to run in = any threading problems, not in class or instance variables. And never ever store them in sessions. Thomas Irineu Avan=E7o Jr. schrieb am 22.03.2005 18:30:08= : > Hi.. > > > > We are facing an issue with DB connections using Jetspeed 1.5 and= Torque > 3.1. We are making stress tests > > with a portal application impelemented under Jetspeed and Torque > architecture. > > The problem is that the connection with Jetspeed DB is not being clos= ed > even after the user gets disconnected. Instead, the connection are= closed > only if I shutdown the Web server, in this case Tomcat 5. > > > > We did some changes in the Torque.properties file to try to make the= m close > properly and it did not work. > > > > Can anybody help us out with this issue ? > > > > Thank you. > > > > > > Irineu Avan=E7o Jr. > > > > >= --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org