Return-Path: Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 60220 invoked by uid 99); 7 Dec 2004 17:56:23 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of brandon.goodin@gmail.com designates 64.233.170.193 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.193) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 07 Dec 2004 09:56:21 -0800 Received: by rproxy.gmail.com with SMTP id g11so289761rne for ; Tue, 07 Dec 2004 09:56:19 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=ZyWCCsuur27MbyH43O3yaCar3P1brdC0rfJ/uWvNmtmMRLkXv8QUyBd56awrfIg2mKJUIp7ilLOv6ium7yFKMqU3+So3HlNvRyVVgHrAJb6Z54oxn+6itFE2iz4a3lHILGzh+c6t8mZu2p3pIzQCELbC+/Y1G1pJXMukt0yR2ww= Received: by 10.38.10.38 with SMTP id 38mr1271730rnj; Tue, 07 Dec 2004 09:56:19 -0800 (PST) Received: by 10.38.74.31 with HTTP; Tue, 7 Dec 2004 09:56:19 -0800 (PST) Message-ID: <2fe5ef5b04120709566b26206e@mail.gmail.com> Date: Tue, 7 Dec 2004 10:56:19 -0700 From: Brandon Goodin Reply-To: Brandon Goodin To: "McCarrier, Alex" Subject: Re: Transaction deadlocks Cc: ibatis-user-java@incubator.apache.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: X-Virus-Checked: Checked When set to External it is your responsibility to manage the transactions. IBatis will not handle them automatically. Brandon On Tue, 7 Dec 2004 11:02:08 -0600, McCarrier, Alex wrote: > I'm running into the following scenario: > > In my unit tests, when I'm testing basic CRUD functionality, on the > removal of an object that has an aggregate relationship with other > objects, I the JVM hangs indefinitely. > > This happens consistently when I have one object that contains a list of > other persistent objects. When we remove the parent object, this > triggers a cascade delete on the contained objects. After the final > removal of the parent objects, when the ibatis code calls the JDBC > PreparedStatement.execute method, the JVM never returns from that > method. > > This seems to be somehow related to transactions. If I specifically > demarcate the transaction using start/commit/end transaction whenever > I'm doing one of these cascade delete operations, it works fine. If I > rely on the ibatis framework for doing automatic transactions, then I > get these deadlocks, but they only seem to show up in these cascade > delete scenarios. > > One thing to note, is that my transaction manager is set to external, > however in these particular unit tests, there is nothing that sets the > transaction since these tests are not calling through an EJB (where we > normally have our transaction boundaries declared). So this begs the > question, do automatic transactions only work when the > TransactionManager type is JDBC? > > This is on iBatis 2.0.8, Oracle 9, and Jboss 3.2.1. >