Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] getLockMode()

I assume you see this behavior through an EM.lock call? Or are you seeing it when executing queries, EM.find() and EM.refresh() as well?

Looking at the code, I'd say em.lock should be checking for a type of NONE (as odd as it would be to call lock with NONE would be) and not do anything if it's set (hence avoid putting the object in the map with a false value).


----- Original Message ----- From: "Darani Yallapragada" <Darani.Yallapragada@xxxxxxx> To: "Dev mailing list for Eclipse Persistence Services" <eclipselink-dev@xxxxxxxxxxx>
Sent: Monday, January 12, 2009 2:47 PM
Subject: [eclipselink-dev] getLockMode()

Hello :

I am trying to test 'getLockMode()' function of EM API Update. When I set lockModeType on an entity to be 'NONE' and step into code, I see that the object(entity) is getting registered in

'OptimisticReadLockObjects' with the value as 'false'. Is this expected ?
(Note : I am considering the values of OptimisticReadLockObjects and PessimisticLockObjects in order to return LockModeType. Because of which , 'getLockMode()' on entity locked with NONE also

returns me 'OPTIMISTIC'.  )

Thank You for your suggestions.


eclipselink-dev mailing list

Back to the top