> If I change to fetch.setWriteLockMode(LockModeType.WRITE), does it guarantee that the record will be held for one thread until it is committed?
I assume you're using the default lock manager(Version), so no setting LockModeType.WRITE will not lock the database record. I believe you need to set openjpa.LockManager to pessimistic in your persistence.xml file and set the WriteLockMode to WRITE to to get database locking. I think a good place to start would be to read through the user manual[1] regarding locking... -- Thanks, Rick [1] http://openjpa.apache.org/builds/1.2.2/apache-openjpa-1.2.2/docs/manual/manual.html#ref_guide_locking_lockmgr On Tue, Apr 13, 2010 at 9:39 PM, Angelo K. Huang <[email protected]> wrote: > > If I change to fetch.setWriteLockMode(LockModeType.WRITE), does it > guarantee > that the record will be held for one thread until it is committed? > -- > View this message in context: > http://n2.nabble.com/ReadLock-Questions-tp4898922p4899643.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. >
