Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 31643 invoked from network); 12 Nov 2009 17:45:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Nov 2009 17:45:04 -0000 Received: (qmail 13169 invoked by uid 500); 12 Nov 2009 17:45:04 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 13118 invoked by uid 500); 12 Nov 2009 17:45:04 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 13108 invoked by uid 99); 12 Nov 2009 17:45:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Nov 2009 17:45:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists+1214986160035-208411@n2.nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Nov 2009 17:44:54 +0000 Received: from tervel.nabble.com ([192.168.236.150]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1N8dij-0003nX-CN for users@openjpa.apache.org; Thu, 12 Nov 2009 09:44:33 -0800 Date: Thu, 12 Nov 2009 09:44:33 -0800 (PST) From: Cil-Gamir To: users@openjpa.apache.org Message-ID: <1258047873264-3994474.post@n2.nabble.com> In-Reply-To: References: <1258039005429-3993427.post@n2.nabble.com> <1258042259376-3993780.post@n2.nabble.com> <1258042991655-3993884.post@n2.nabble.com> <1258043122344-3993911.post@n2.nabble.com> <1258043163027-3993916.post@n2.nabble.com> <1258043195529-3993922.post@n2.nabble.com> Subject: Re: Locking Exception after Persisting new entity MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: Cil-Gamir X-Virus-Checked: Checked by ClamAV on apache.org Hi Daryl I'm not closing the entity manager, where should I do this ? I'm also not familiar with enhancing, my entity classes were declared as final, and JPA complained saying that it cannot do the enhancement for me if my classes are final. If I want to do the build time enhancement, where is a good place to start to figure out how. The basic scenario is as follows. 1. I fetch an entity 2. I make a change to that entity and I save it (saving here involves creating a new entity as i'm trying to version rows in the database). 3. I fetch another different entity 4. upon trying to save that entity it fails. If I only save without persisting a new entity I can do that the whole day. but once I create a new entity the subsequent operation on any other entity or the newly saved one throws an optimistic locking exception -- View this message in context: http://n2.nabble.com/Re-SOLVED-Re-Locking-Exception-after-Persisting-new-entity-tp3992651p3994474.html Sent from the OpenJPA Users mailing list archive at Nabble.com.