Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 40432 invoked from network); 19 Oct 2007 04:22:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Oct 2007 04:22:08 -0000 Received: (qmail 82412 invoked by uid 500); 19 Oct 2007 04:21:52 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 82349 invoked by uid 500); 19 Oct 2007 04:21:52 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 82339 invoked by uid 99); 19 Oct 2007 04:21:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2007 21:21:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kostas.g.papadopoulos@gmail.com designates 72.14.214.228 as permitted sender) Received: from [72.14.214.228] (HELO hu-out-0506.google.com) (72.14.214.228) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2007 04:21:56 +0000 Received: by hu-out-0506.google.com with SMTP id 38so623019huc for ; Thu, 18 Oct 2007 21:21:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=9lpuuiBA5acp01lgjF3b4NgSgaS8eueyHVNMOpS247Q=; b=OblDv3KWamF0Rbuhjfbs1UX5So4mD24MyNtYrB4uPP6sQtwVjYBRVxGf3e4C62GqVwIBv3+VGPUb9owERkJ0uIULNaBeL01OMqoPs/5wbQ/arK+eSEDr/ozESP+CO6UvxQIJJpiMVdUelIa3lflDzumqhqVTItqeo6h9CUw3rK8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uUH9d78zheMLFeXZIXa7/8CkBm2ig5UNI58yNmBVmTc7ADgXVh661+1c0vMMtUf7sZtX+GSCbLF4TsB1jHLcz9Dv5ilbUHP5N36efVW3eLJHf0vTAD6Y/ngMgjboDieKXRx9YZN02Fc17KFupVyd7o8JhpvIsEVjBxNEaoI4UaA= Received: by 10.78.130.6 with SMTP id c6mr948037hud.1192767695011; Thu, 18 Oct 2007 21:21:35 -0700 (PDT) Received: by 10.78.118.10 with HTTP; Thu, 18 Oct 2007 21:21:34 -0700 (PDT) Message-ID: Date: Fri, 19 Oct 2007 07:21:34 +0300 From: "Kostas Papadopoulos" To: "Jakarta Commons Users List" Subject: Re: tomcat and setAutoCommit In-Reply-To: <4717D0A0.1060906@hanik.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4717D0A0.1060906@hanik.com> X-Virus-Checked: Checked by ClamAV on apache.org Thanks, This was issue DBCP-102. I should have checked there first. It is marked resolved but it still sets autocommit to true in passivateObject(), so it will need some work to remove the overhead. kostas On 10/19/07, Filip Hanik - Dev Lists wrote: > looks like it is hard coded in commons-dbcp to set autocommit to true > > PoolableConnectionFactory.java > > public void passivateObject(Object obj) throws Exception { > if(obj instanceof Connection) { > Connection conn = (Connection)obj; > if(!conn.getAutoCommit() && !conn.isReadOnly()) { > conn.rollback(); > } > conn.clearWarnings(); > if(!conn.getAutoCommit()) { > conn.setAutoCommit(true); > } > } > if(obj instanceof DelegatingConnection) { > ((DelegatingConnection)obj).passivate(); > } > } > > If you feel this is incorrect, or cause overhead, then file a bug with > the DBCP folks > > Filip > > Kostas Papadopoulos wrote: > > I'm using tomcat/jdbc/mysql with the tomcat suplied DBCP connection > > pool configured with defaultAutoCommit=false. After tracing the > > queries sent to the database, I've noticed that a "set autocommit=1" > > is always followed by "set autocommit=0". I'm not sure who is setting > > "autocommit=1", probably the connection.close() in the pool > > somewhere. > > > > Is there a way to make it stop? Can anyone know of a reason why this > > would be needed? > > > > Thanks > > Kostas > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > > For additional commands, e-mail: user-help@commons.apache.org > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org