Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 85624 invoked from network); 21 Apr 2004 07:13:02 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 21 Apr 2004 07:13:02 -0000 Received: (qmail 58917 invoked by uid 500); 21 Apr 2004 07:12:32 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 58902 invoked by uid 500); 21 Apr 2004 07:12:32 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 58887 invoked from network); 21 Apr 2004 07:12:32 -0000 Received: from unknown (HELO hotmail.com) (65.54.184.112) by daedalus.apache.org with SMTP; 21 Apr 2004 07:12:32 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 21 Apr 2004 00:12:45 -0700 Received: from 61.11.76.49 by bay15-dav8.bay15.hotmail.com with DAV; Wed, 21 Apr 2004 07:12:44 +0000 X-Originating-IP: [61.11.76.49] X-Originating-Email: [antonypaul24@hotmail.com] X-Sender: antonypaul24@hotmail.com From: "Antony Paul" To: "Jakarta Commons Users List" References: <408584FF.7010305@pandora.be> Subject: Re: [DBCP] PreparedStatements throwing Already closed Exception. Date: Wed, 21 Apr 2004 12:45:15 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Message-ID: X-OriginalArrivalTime: 21 Apr 2004 07:12:45.0119 (UTC) FILETIME=[0B36FCF0:01C42770] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I am using DBCP 1.1 stable. I shall give details later but a quick question. In PoolablePreparedStatement.close() method it is checking isClosed() and throws SQLException if it is already closed. What is its intention ?. Antony Paul ----- Original Message ----- From: "Dirk Verbeeck" To: "Jakarta Commons Users List" Sent: Wednesday, April 21, 2004 1:45 AM Subject: Re: [DBCP] PreparedStatements throwing Already closed Exception. > What version are you using? (v1.1 or nightly build) > Can you give a small code example of the problem? > > -- Dirk > > Antony Paul wrote: > > > Hi all, > > I was using DBCP quite well without any problem. Yesterday I had an idea > > to reap the benefit of PreparedStatement pools because 95% of our > > application uses PreparedStatements. But to my surprise it is throwing > > SQLException("Already closed") in PoolablePreparedStatement when > > PreparedStatement pooling is turned on. What is the need of throwing an > > exception here against the default behaviour of ordinary PreparedStatements > > ?. I think this is unwanted as it forces to set a PreparedStatement to null > > on closing and in the finally block again check it for null when the same > > prepared statement is used. Or is there anything as not use same > > PreparedStatement for another sql statement ?. If so please document it in > > the configuration section and API of DBCP. > > > > Antony Paul > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org