From open-jpa-dev-return-3635-apmail-incubator-open-jpa-dev-archive=incubator.apache.org@incubator.apache.org Fri Apr 20 01:18:29 2007 Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 4009 invoked from network); 20 Apr 2007 01:18:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Apr 2007 01:18:28 -0000 Received: (qmail 29721 invoked by uid 500); 20 Apr 2007 01:18:34 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 29696 invoked by uid 500); 20 Apr 2007 01:18:34 -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 29687 invoked by uid 99); 20 Apr 2007 01:18:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2007 18:18:34 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [192.18.42.249] (HELO nwk-ea-fw-1.sun.com) (192.18.42.249) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2007 18:18:27 -0700 Received: from d1-sfbay-09.sun.com ([192.18.39.119]) by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3K1I6Xw010149 for ; Thu, 19 Apr 2007 18:18:06 -0700 (PDT) Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JGR00L01VIV5X00@d1-sfbay-09.sun.com> (original mail from david@vancouvering.com) for open-jpa-dev@incubator.apache.org; Thu, 19 Apr 2007 18:18:06 -0700 (PDT) Received: from [192.168.1.100] ([64.142.91.3]) by d1-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JGR0010ZVM6AVPB@d1-sfbay-09.sun.com> for open-jpa-dev@incubator.apache.org; Thu, 19 Apr 2007 18:18:06 -0700 (PDT) Date: Thu, 19 Apr 2007 18:18:10 -0700 From: David Van Couvering Subject: Re: Help requested around rollback semantics In-reply-to: <7D856CDFE035FF45A0420ACBD71BDD6303F5013F@repbex02.amer.bea.com> Sender: David.Vancouvering@Sun.COM To: open-jpa-dev@incubator.apache.org Message-id: <462814D2.1090303@vancouvering.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <4627FE09.70108@vancouvering.com> <7D856CDFE035FF45A0420ACBD71BDD6303F5013F@repbex02.amer.bea.com> User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) X-Virus-Checked: Checked by ClamAV on apache.org That's what I thought: broken and detached. Might as well just throw them out. Not to be blunt, but this just sucks. It's as if JPA believes nobody will ever really experience a rollback... Bleagh! David Patrick Linskey wrote: >> In generic JPA, the only way to deal with the situation you >> describe would be to manually call EntityManager.refresh() on >> each instance that was involved in the transaction so as to >> ensure that it is up to date. > > Actually, I think it's even tougher than this. I think that after > rollback, entities are in an 'error' state, and you really can't do much > of anything with them. I don't think that there's even a guarantee that > you can re-attach such instances. > > I believe that in either a transactional or extended PC, instances are > detached into this error state after a rollback. So, I don't think that > you can actually call refresh() on them, per the spec. > > -Patrick >