Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 19782 invoked from network); 24 Jan 2009 04:12:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2009 04:12:25 -0000 Received: (qmail 44400 invoked by uid 500); 24 Jan 2009 04:12:19 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 44381 invoked by uid 500); 24 Jan 2009 04:12:19 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 44372 invoked by uid 99); 24 Jan 2009 04:12:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jan 2009 20:12:19 -0800 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 clinton.begin@gmail.com designates 209.85.146.180 as permitted sender) Received: from [209.85.146.180] (HELO wa-out-1112.google.com) (209.85.146.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Jan 2009 04:12:12 +0000 Received: by wa-out-1112.google.com with SMTP id k40so125231wah.0 for ; Fri, 23 Jan 2009 20:11:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=KtEXacBU/hl6apuqaEp+8+s+V8iS51Ze2smPV1D7hDs=; b=MzOcR7Hl+qL19UH0/IWSZJ9/jM1TK7guiTCxND7ERr5J/5s9eb9pGep6heghZMqh7n h/gVRCG0SjzeoPz6heuZakuwoWABVb6+HEqz7JgID+ISHNXNrq970P69YhsQs7V5F7Xv wkAUyg/SdhP7lUuuu49vPTYhe5zUq+O55JzgM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=bWqKLWWzckq638iGpqGEvsZZdAPjJEKJJvhXnqtooSYfJ9Gxrks5muHe3OMD9Azkxc /krfltEw1DG/NaUmPkWHAH+UhSt9UsTTUdhzJkur18NkHXwXyFMutnrwLwdBDSGqEFUJ tg6+/e53l0rlnEcqOLQcP7eXza+jAnUMN354I= MIME-Version: 1.0 Received: by 10.114.180.1 with SMTP id c1mr1247151waf.192.1232770312387; Fri, 23 Jan 2009 20:11:52 -0800 (PST) In-Reply-To: <497a5e2a.0589300a.0e2f.40c7@mx.google.com> References: <497a5e2a.0589300a.0e2f.40c7@mx.google.com> Date: Fri, 23 Jan 2009 21:11:52 -0700 Message-ID: <16178eb10901232011s28afe337ga90ff00b9dfa127c@mail.gmail.com> Subject: Re: Transactions and Pooling From: Clinton Begin To: user-java@ibatis.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org The reason is so that you can implement the recommended coding pattern: try { // start transaction // commit transaction } finally { // end transaction } If you called commit OR end/rollback, you'd have to use a catch block.... which sux. :-) Cheers, Clinton On Fri, Jan 23, 2009 at 5:17 PM, Jonathan Moores wrote: > Hi, > > I was wondering why there is a need to explicitly call > SqlMapClient.endTransaction() in order to return a connection to the pool > even after a commitTransaction()? > > > > I am using Tomcat 6.018 with Ibatis 2.34.726 and I see that the connections > used in a transaction are never returned without the endTransaction() call > which I actually equated to a rollback. > > > > Thanks > > Jon