openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: Object Locking and Application Server (container-managed) environment
Date Wed, 26 Sep 2007 13:00:42 GMT
Discovered a useful openjpa property...

On 9/25/07, Kevin Sutter <kwsutter@gmail.com> wrote:
>
> 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 <jta-data-source> 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.


Okay.  It was pointed out to me that the openjpa.Optimistic property exists
to indicate whether to use optimistic or non-optimistic transaction
semantics.  So, it's not just an implicit operation.  But, I guess my
question still exists on how this applies to container managed JTA
transactions.  I will continue to investigate, but if there are any existing
experts in this area, I'd appreciate some insights.  :-)  Thanks!

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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message