Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 90103 invoked from network); 2 Feb 2007 00:02:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Feb 2007 00:02:53 -0000 Received: (qmail 90294 invoked by uid 500); 2 Feb 2007 00:02:55 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 90275 invoked by uid 500); 2 Feb 2007 00:02:55 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 90258 invoked by uid 99); 2 Feb 2007 00:02:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Feb 2007 16:02:55 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of plinskey@bea.com designates 66.248.192.22 as permitted sender) Received: from [66.248.192.22] (HELO usremg02.bea.com) (66.248.192.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Feb 2007 16:02:46 -0800 Received: from usremr01.bea.com (usremr01.bea.com [10.160.29.91]) by usremg02.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id l1202OGc031482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 1 Feb 2007 16:02:25 -0800 Received: from repbex02.amer.bea.com (repbex02.bea.com [10.160.26.99]) by usremr01.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id l1202Nmu025556 for ; Thu, 1 Feb 2007 16:02:23 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Exceptions thrown from callbacks Date: Thu, 1 Feb 2007 16:02:14 -0800 Message-ID: <7D856CDFE035FF45A0420ACBD71BDD63031EA51D@repbex02.amer.bea.com> In-Reply-To: <5FAB46C0-3476-4D36-B63B-D14EC1A4B7AA@iq80.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Exceptions thrown from callbacks Thread-Index: AcdGXJZNkAVsCsiETgqHGxOAsPdRqwAAIzfQ References: <7D856CDFE035FF45A0420ACBD71BDD63031EA4EB@repbex02.amer.bea.com> <5FAB46C0-3476-4D36-B63B-D14EC1A4B7AA@iq80.com> From: "Patrick Linskey" To: X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.1.2.111433 X-Virus-Checked: Checked by ClamAV on apache.org > > 3.5.6: > > > > "Lifecycle callback methods may throw runtime exceptions. A runtime > > exception thrown by a callback method that executes within a=20=20 > > transaction > > causes that transaction to be rolled back. No further lifecycle=20=20 > > callback > > methods will be invoked after a runtime exception is thrown." >=20 > One other thing to check is if the tx is marked rollback=20 > only, should=20=20 > we not call anymore lifecycle events or is that "NoFurther lifecycle=20= =20 > callback" clause supposed to apply to the single entity that failed. You mean: if someone calls setRollbackOnly() and then calls flush(), what should we do about the @PreUpdate callback? I don't have a strong opinion either way. My read of the spec is that we should execute the callback; callbacks should only be aborted if the exception is thrown during a time when the callbacks would have otherwise been invoked. > > Further, I think that 3.7 trumps 3.5.6, so if an exception is thrown > > from a callback during a find(), we should be marking the=20 > transaction > > for rollback, rather than actually rolling it back. >=20 > That is standard EJB behavior and what I would expect from the EJB=20=20 > spec committee. Agreed. -Patrick _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.