I was wondering if someone could shed some light on how ICache.Lock is
expected to behave.  I have looked myself but I am just not as
familiar with the contrib code as I should be and was not able to
easily find it by looking at the code.  Perhaps one of you who is more
experienced than I could answer the following:

If a lock currently exist on a entity and I try to acquire that lock
with ICache.Lock (assuming locking in implemented) is the provider
expected to block on the lock call or just return failure.  If it is
the latter I believe there is a rather dangerous bug in the NH
Velocity (App Fabric) cache provider even in the patched version.  As
Velocity's (App Fabric's) lock operation is non blocking and simply
throws an exception when a lock is already acquired.


The following is from the App Fabric documentation for the
DataCache.GetAndLock() function:
Return Value


Returns Object matching the specified key parameter if the Object is
present and is not locked.
If the key does not exist, a DataCacheException object is thrown with
the ErrorCode set to KeyDoesNotExist. Create objects based on the
referenced key to resolve this error.


If the object is already locked by another cache client, a
DataCacheException object is thrown with the ErrorCode set to
ObjectLocked. The object will be inaccessible until it is unlocked by
the locking client.

Any Info would be hugely appreciated,
Thanks,
Adam Carasso

-- 
You received this message because you are subscribed to the Google Groups 
"NHibernate Contrib - Development Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhcdevs?hl=en.

Reply via email to