[infinispan-dev] Some flags are incompatible with implicit transactions

Mircea Markus mircea.markus at jboss.com
Wed Dec 14 08:45:10 EST 2011


On 13 Dec 2011, at 16:00, Sanne Grinovero wrote:

> On 13 December 2011 13:48, Galder Zamarreño <galder at redhat.com> wrote:
>> 
>> On Dec 13, 2011, at 2:39 PM, Sanne Grinovero wrote:
>> 
>>> Why would you avoid FORCE_WRITE_LOCK ?
>> 
>> Does the following make sense?
>> 
>> tx.begin()
>> cache.withFlags(FORCE_WRITE_LOCK).get(…)
>> tx.commit()
> 
> Yeah it's pointless to use locks if you have a single operation, but I
> might want to do more operations in a single transaction.. actually
> what's the point of using a transaction if I have only one operation?
WIthout transaction it is possible that the operation is only partially applied, i.e. on a subset of numOwners, resulting in inconsistent state.




More information about the infinispan-dev mailing list