From open-jpa-dev-return-2140-apmail-incubator-open-jpa-dev-archive=incubator.apache.org@incubator.apache.org Tue Feb 13 20:09:41 2007 Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 18056 invoked from network); 13 Feb 2007 20:09:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2007 20:09:38 -0000 Received: (qmail 73649 invoked by uid 500); 13 Feb 2007 20:09:45 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 73610 invoked by uid 500); 13 Feb 2007 20:09:45 -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 73601 invoked by uid 99); 13 Feb 2007 20:09:45 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Feb 2007 12:09:45 -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 awhite@bea.com designates 66.248.192.21 as permitted sender) Received: from [66.248.192.21] (HELO usremg01.bea.com) (66.248.192.21) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Feb 2007 12:09:35 -0800 Received: from usremr02.bea.com (usremr02.bea.com [10.160.29.92]) by usremg01.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id l1DK9DET006211 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 13 Feb 2007 12:09:13 -0800 Received: from [10.0.1.9] ([10.43.243.1]) by usremr02.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id l1DK9Avp006274 for ; Tue, 13 Feb 2007 12:09:12 -0800 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <7D856CDFE035FF45A0420ACBD71BDD6303380F6B@repbex02.amer.bea.com> References: <1171309551.57605.325.camel@sr1-unyc10-05> <7D856CDFE035FF45A0420ACBD71BDD63032E6ED7@repbex02.amer.bea.com> <89c0c52c0702131021g36fd2ebdve20c87c69a2043c4@mail.gmail.com> <7D856CDFE035FF45A0420ACBD71BDD6303380F30@repbex02.amer.bea.com> <7D856CDFE035FF45A0420ACBD71BDD6303380F6B@repbex02.amer.bea.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <99917C95-B398-4CDA-AC7B-228A9259327C@bea.com> Content-Transfer-Encoding: 7bit From: Abe White Subject: Re: pessimistic locking Date: Tue, 13 Feb 2007 14:09:14 -0600 To: open-jpa-dev@incubator.apache.org X-Mailer: Apple Mail (2.752.3) X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.1.2.131432 X-Virus-Checked: Checked by ClamAV on apache.org First, I want to point out that I was wrong about needing to set a lock level in code during an optimistic transaction. So actually for us to run the benchmark, the only necessary setting is: openjpa.LockManager: pessimistic Contrary to what Patrick said and I backed up, we don't need to set Optimistic to false or set any lock levels. The defaults will work correctly to avoid locking objects other than those explicitly locked with EM.lock(), and with the above lock manager those explicitly- locked objects will get database locks. This seems to me to be exactly how it should be. > Hmm. It would seem that the LockManager should default to pessimistic > when Optimistic=false. Any reason why this is not the case? With respect to object locking, Optimistic=false just means that objects are locked automatically at the configured lock levels when read/written. I don't think that should affect what it means to "lock" an object, which is the purview of the LockManager. _______________________________________________________________________ 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.