Skip to main content

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

Hello Guy,

I ran against the latest build and verified that LockModeType 'NONE' still registers in the 'getOptimisticReadLock' with the value false.

When 'lock( object, LockModeType.NONE)' method is executed , 'forceUpdateToVersionField()' is called which makes the object with lockModeType 'NONE' to register

itself in 'getOptimisticReadLock()' method with value false.
I can see the same pattern when I call find() and refresh() also.

Thank You

Darani


Guy Pelletier wrote:
That surprises me. And your running against the latest code? Have you pin-pointed when exactly the object is being placed into the map with a false value?

It should not be in that list with a type of NONE specified.

Cheers,
Guy

----- Original Message ----- From: "Darani Yallapragada" <Darani.Yallapragada@xxxxxxx> To: "Guy Pelletier" <guy.pelletier@xxxxxxxxxx>; "Dev mailing list for Eclipse Persistence Services" <eclipselink-dev@xxxxxxxxxxx>
Sent: Monday, January 12, 2009 7:54 PM
Subject: Re: [eclipselink-dev] getLockMode()



Hello Guy,

I see the same behavior for EM.find() as well as EM.refresh() too. Rest of the LockModeTypes work fine.

Darani



Guy Pelletier wrote:
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).

Cheers,
Guy

----- 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.

Regards
Darani



_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev


_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev



_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev



Back to the top