[infinispan-dev] mixing optimistic and explicit locking

Mircea Markus mircea.markus at jboss.com
Thu Sep 8 05:00:49 EDT 2011


On 7 Sep 2011, at 19:25, Manik Surtani wrote:

> I don't think so - since the whole explicit locking cfg option goes away and will be replaced with pessimistic locking, correct?
This will be deprecated:
      configuration.fluent().transaction().useEagerLocking(true);
and replaced by:
      configuration.fluent().transaction().lockingMode(LockingMode.PESSIMISTIC)

Do we want to forbid[1] cache.getAdvancedCache().lock(k)/unlock(k) when the cache is running in optimistic mode?
I'm very tempted to say yes, just because this would mean mixing optimistic and pessimistic locking which might end up in very complex user and maintenance scenarios.

Cheers,
Mircea

[1] if so we can deprecate these methods as we already achieve the same functionality in the case of pessimistic locking by using Flag.FORCE_WRITE_LOCK
 
> 
> On 7 Sep 2011, at 17:55, Mircea Markus wrote:
> 
>> Hi,
>> 
>> Do we want to support explicit locking within optimistic locking scheme? This is something that is currently supported, i.e. one can used the advanced cache's lock method on an optimistic cache.
>> My concern is mainly related to the existing use cases, is there a need for allowing this?
>> 
>> Cheers,
>> Mircea
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> --
> Manik Surtani
> manik at jboss.org
> twitter.com/maniksurtani
> 
> Lead, Infinispan
> http://www.infinispan.org
> 
> 
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev




More information about the infinispan-dev mailing list