Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 51557 invoked from network); 25 Sep 2007 19:20:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Sep 2007 19:20:57 -0000 Received: (qmail 23299 invoked by uid 500); 25 Sep 2007 19:20:47 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 23282 invoked by uid 500); 25 Sep 2007 19:20:47 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 23273 invoked by uid 99); 25 Sep 2007 19:20:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2007 12:20:47 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwsutter@gmail.com designates 209.85.128.189 as permitted sender) Received: from [209.85.128.189] (HELO fk-out-0910.google.com) (209.85.128.189) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2007 19:20:48 +0000 Received: by fk-out-0910.google.com with SMTP id z22so2252962fkz for ; Tue, 25 Sep 2007 12:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=kM8gZJFjK4EaXQGbIhyAOf9RVCRf+cBHst4XyYnmss4=; b=dM38o6DY6n72UoPlRbNqyFJ+KYwRDiwASLrJcEDdGasiJIVzDqVnoppIo2QPQKL0KVtkST8CxYNOCi7y+HYZj7rYE+qDj7+rissk09PrJjvH4P3y90kFch88RvvFrFklgGqf3OsEeLOEVxp+PM2pkHwk4lQQxWHQFT5AuKAVoL4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=CEHkq7AvZZZOYYisiV55TGpto/FJGzscx5v170t/CE83FbAhHDxhJfaOVI4D6mAoALHLaCvlAdQN9/HtragvOGWUlxYXlF0u/QHK+lUbvrcUDljaEVvlmFVeb0A7WRIbknTIpH+AjdoRNRgSOEJFsUEJEarinobJAS/LPNzc+j0= Received: by 10.82.172.10 with SMTP id u10mr9827995bue.1190748024329; Tue, 25 Sep 2007 12:20:24 -0700 (PDT) Received: by 10.82.176.19 with HTTP; Tue, 25 Sep 2007 12:20:24 -0700 (PDT) Message-ID: <89c0c52c0709251220x7a5b475fv79d5e6fcb0e46756@mail.gmail.com> Date: Tue, 25 Sep 2007 14:20:24 -0500 From: "Kevin Sutter" To: dev@openjpa.apache.org Subject: Object Locking and Application Server (container-managed) environment MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2429_21990646.1190748024319" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_2429_21990646.1190748024319 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I'm trying to figure out the ins and outs of Section 3 Object Locking as they relate to running OpenJPA within an application server (container-managed) environment such as WebSphere. It seems that several of these properties and/or API's are assuming an application-managed environment outside of a container. Either that, or there are implied behaviors of the container environment that WebSphere is not providing. For example, the ReadLockLevel property allows for none, read, or write values. What does it mean for "none" in an application server environment? If the Container has already initiated a global (JTA) transaction, when OpenJPA requests a Connection (via the element), this Connection is automatically enlisted in the Transaction. Thus, when the "Select..." statement is issued, we will get a Read Lock on the row with the default isolation level setting (supposed to be Read Committed). So, how is OpenJPA supposed to honor the "none" ReadLockLevel request? Several places in this section of the document, there are references to optimistic and non-optimistic (pessimistic) transactions. Not lock managers, but transactions. The OpenJPA manual indicates that it can support optimistic transactions by not issuing the database transaction until flush or commit time. But, I don't see how we are can configure for the use of optimistic vs pessimistic transactions. It looks like the EntityTransaction interface is optimistic by default. But, is there anyway to control the optimisticity (new word) of a global transaction? The answer to these questions actually help with the first example outlined above. Many other similar questions are in my mind, but let's start with these since I think these will give a basis for the rest of the discussion. Thanks, Kevin ------=_Part_2429_21990646.1190748024319--