[infinispan-dev] Exposing LockManager?

Galder Zamarreño galder at redhat.com
Tue May 31 11:26:23 EDT 2011


On May 31, 2011, at 2:42 PM, Dan Berindei wrote:

> On Tue, May 31, 2011 at 12:34 PM, Sanne Grinovero
> <sanne.grinovero at gmail.com> wrote:
>> What's the purpose of exposing this? making it possible to explicitly unlock
>> keys before the transaction ends, and use locks out of transaction?
>> 
> 
> The idea is to allow users to sort their keys (with
> LockManager.getLockId) so that even with striped locking the locks are
> always acquired in the same order, preventing deadlocks.

Yeah, that's right.

> I didn't think about the other operations in the LockManager though. I
> guess we could create a new interface with only getLockId() for now,
> and wait to expose the other methods until users request them.

Good point Dan. I'm fine with that.

Let's wait for Manik to come back on this cos he was the one implementing it. He might have had different ideas...

> 
> Dan
> 
> 
>> On 31 May 2011 10:05, "Galder Zamarreño" <galder at redhat.com> wrote:
>>> 
>>> On May 30, 2011, at 9:52 AM, Dan Berindei wrote:
>>> 
>>>> I guess you could get a hold of the lock manager via JMX, but it's
>>>> probably better to access it through AdvancedCache.
>>> 
>>> Just to be clear, we only use JMX purely for monitoring and management at
>>> a fine-grained level. A lock manager or similar component should not be
>>> exposed via JMX.
>>> 
>>>> 
>>>> In fact Manik was already suggesting in
>>>> http://community.jboss.org/message/594715#594715 that it should be
>>>> exposed via AdvancedCache, maybe he forgot about it when he
>>>> implemented it.
>>> 
>>> Yeah, that's precisely my feeling, that he implemented it all but forgot
>>> to to add the method in AdvancedCache.
>>> 
>>> He'll be able to clarify when he gets back.
>>> 
>>>> 
>>>> Dan
>>>> 
>>>> 
>>>> On Fri, May 27, 2011 at 8:02 PM, Galder Zamarreño
>>>> <galder.zamarreno at redhat.com> wrote:
>>>>> Hi,
>>>>> 
>>>>> Re: https://issues.jboss.org/browse/ISPN-993
>>>>> 
>>>>> This has been implemented but how does a client get hold of the
>>>>> LockManager? You have to use magic cos it's not exposed via the
>>>>> AdvancedCache nor Cache, is it?
>>>>> 
>>>>> This is also somehow related to
>>>>> http://community.jboss.org/message/606972#606972
>>>>> 
>>>>> Cheers,
>>>>> --
>>>>> Galder Zamarreño
>>>>> Sr. Software Engineer
>>>>> Infinispan, JBoss Cache
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> infinispan-dev mailing list
>>>>> infinispan-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>>>> 
>>>> 
>>>> _______________________________________________
>>>> infinispan-dev mailing list
>>>> infinispan-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>> 
>>> --
>>> Galder Zamarreño
>>> Sr. Software Engineer
>>> Infinispan, JBoss Cache
>>> 
>>> 
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> infinispan-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache




More information about the infinispan-dev mailing list