openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abe White <awh...@bea.com>
Subject Re: pessimistic locking
Date Tue, 13 Feb 2007 20:09:14 GMT
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.

Mime
View raw message