openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Object Locking and Application Server (container-managed) environment
Date Tue, 25 Sep 2007 19:20:24 GMT
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.

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