Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 30EE8104F1 for ; Wed, 30 Oct 2013 08:55:37 +0000 (UTC) Received: (qmail 24587 invoked by uid 500); 30 Oct 2013 08:55:34 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 24529 invoked by uid 500); 30 Oct 2013 08:55:24 -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 24516 invoked by uid 99); 30 Oct 2013 08:55:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 08:55:19 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of luk.stadler@gmail.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 08:55:14 +0000 Received: from jim.nabble.com ([192.168.236.80]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1VbRYD-0004fA-FH for users@openjpa.apache.org; Wed, 30 Oct 2013 01:54:53 -0700 Date: Wed, 30 Oct 2013 01:54:53 -0700 (PDT) From: lukair To: users@openjpa.apache.org Message-ID: <1383123293450-7585480.post@n2.nabble.com> Subject: Prevent Optimistic-Locks with where-clause MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi there, We have a highly concurrent websphere application where we have a lot of optimisticLockExceptions at the moment. I'd like to know if OpenJPA has a feature like EclipseLink where I can directly adress the OptimisticLock problem with @OptimisticLocking. (see for example http://buttso.blogspot.ch/2009/10/exploring-eclipselink-optimistlocking.html) What we would need, is a feature which works like @OptimisticLocking(type=OptimisticLockingType.CHANGED_COLUMNS) (see link before). This describes a locking implementation which checks each changed field(and only those) if they were change during the process and only cause a optimistic lock if so. This means, the Update Query will have a longer where clause which checks for changes on only the updated fields. I found the very same feature request in JIRA https://issues.apache.org/jira/browse/OPENJPA-1451 where Patrick writes about Kodo's implementation, but isn't clear about how to do that eventually. Thanks, Lukas -- View this message in context: http://openjpa.208410.n2.nabble.com/Prevent-Optimistic-Locks-with-where-clause-tp7585480.html Sent from the OpenJPA Users mailing list archive at Nabble.com.