Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 57780 invoked from network); 30 Nov 2003 17:29:53 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Nov 2003 17:29:53 -0000 Received: (qmail 34178 invoked by uid 500); 30 Nov 2003 17:29:42 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 34052 invoked by uid 500); 30 Nov 2003 17:29:41 -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 33934 invoked from network); 30 Nov 2003 17:29:40 -0000 Received: from unknown (HELO apate.telenet-ops.be) (195.130.132.57) by daedalus.apache.org with SMTP; 30 Nov 2003 17:29:40 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by apate.telenet-ops.be (Postfix) with SMTP id 6396737EAB for ; Sun, 30 Nov 2003 18:29:43 +0100 (MET) Received: from pandora.be (D5E059E1.kabel.telenet.be [213.224.89.225]) by apate.telenet-ops.be (Postfix) with ESMTP id 3B78C38021 for ; Sun, 30 Nov 2003 18:29:43 +0100 (MET) Message-ID: <3FCA28FD.2030601@pandora.be> Date: Sun, 30 Nov 2003 18:29:33 +0100 From: Dirk Verbeeck User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [DBCP] Are connection properties reset when returning to pool ? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 Yes, the following properties are reset on each getConnection. setAutoCommit setReadOnly setTransactionIsolation setCatalog -- Dirk John Zoetebier wrote: > Does DBCP reset properties like AutoCommit ? > > For example a class with 2 methods: > public void ClientDataModel readClient() { > conn = DriverManager.getConnection(Constants.JDBC_URL); > // Do I have to set AutoCommit explitly here ? > conn.setAutoCommit(true); // No transaction > ... > conn.close() > } > > public void void updateClient(ClientDataModel) { > conn = DriverManager.getConnection(Constants.JDBC_URL); > // Do I have to set AutoCommit explitly here ? > conn.setAutoCommit(false); // Run in transaction mode > ... > conn.close() > } > > Assume that I have only 1 connection in the pool. > After connection has been closed in a method, is it returned to the next > method like it was set in the previous method ? > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org