All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: About Question enthuware.oce-jpad.v6.2.369 :
PostPosted: Sat Dec 24, 2016 2:01 pm 
Offline

Joined: Mon Jun 20, 2016 5:06 pm
Posts: 185
Quote:
As per section 3.4.4.2: When an application locks an entity with LockModeType.PESSIMISTIC_READ and later updates that entity, the lock must be converted to an exclusive lock when the entity is flushed to the database.


How do you interpret "exclusive lock". Why it has to be exactly PESSIMISTIC_WRITE? Could it be PESSIMISTIC_FORCE_INCREMENT?


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.oce-jpad.v6.2.369 :
PostPosted: Sun Dec 25, 2016 12:56 pm 
Offline
Site Admin

Joined: Fri Sep 10, 2010 9:26 pm
Posts: 6686
Yes, it could be PESSIMISTIC_FORCE_INCREMENT as well, which is same as PESSIMISTIC_WRITE with version update.


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.oce-jpad.v6.2.369 :
PostPosted: Sun Dec 25, 2016 6:31 pm 
Offline

Joined: Mon Jun 20, 2016 5:06 pm
Posts: 185
It could have similar semantics, but it has different definition. Thank you.


Top
 Profile Send private message  
 
 Post subject: Re: About Question enthuware.oce-jpad.v6.2.369 :
PostPosted: Mon Aug 14, 2017 4:30 pm 
Offline

Joined: Fri Nov 29, 2013 8:26 pm
Posts: 357
For the second option explanation '.... without blocking other transactions reading the data".
I think we can modify this statement by adding " ...without blocking other transactions reading the data which was committed in a previous transaction."

When one transaction gets the pessimistic read lock, other transactions can read the entity's data in the database, but not the pending changes in the persistence context. After the transaction commits the changes to the database, other transactions need to refresh the entity.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Template made by DEVPPL/ThatBigForum