Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

69946: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud)
      69860: MNT-11371: Alfresco unable to bootstrap due to LockTryExceptions following an upgrade from 3.4.8 -> 3.4.13 -> 4.0.2 to either 4.1.8 or 4.2.1
      Merged 4.1.N to V4.2.N (4.2.3)
         69848: MNT-11371: Alfresco unable to bootstrap due to LockTryExceptions following an upgrade from 3.4.8 -> 3.4.13 -> 4.0.2 to either 4.1.8 or 4.2.1
           Ability to configure try lock timeout for several different contexts has been implemented. New configuration for every context has been added:
           - system.lockTryTimeout=100
           - system.lockTryTimeout.DictionaryDAOImpl=2000
           - system.lockTryTimeout.MessageServiceImpl=${system.lockTryTimeout}
            - system.lockTryTimeout.PolicyComponentImpl=${system.lockTryTimeout}
           'LockHelper.tryLock()' has been modified to accept additional string 'useCase' parameter. Parameter is used for throwing exceptions with contextual messages when lock is not acquired
         69858: MNT-11371: Alfresco unable to bootstrap due to LockTryExceptions following an upgrade from 3.4.8 -> 3.4.13 -> 4.0.2 to either 4.1.8 or 4.2.1
           Additional boolean parameter 'haveWriteLock' has been added to 'MessageServiceImpl.getResourceBundleBaseNames()' method. It serves to avoid unlocking external write locks. The method still assumes that read lock is acquired if 'haveWriteLock=false'. Read lock will be upgraded to write lock only if 'haveWriteLock' parameter is equal to false


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@70462 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-05-16 20:06:48 +00:00
parent dab8858288
commit c505322c35
10 changed files with 104 additions and 45 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
* Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -51,7 +51,7 @@ public class ClassPolicyDelegate<P extends ClassPolicy>
* @param index the behaviour index to query against
*/
@SuppressWarnings("unchecked")
/*package*/ ClassPolicyDelegate(DictionaryService dictionary, Class<P> policyClass, BehaviourIndex<ClassBehaviourBinding> index)
/*package*/ ClassPolicyDelegate(DictionaryService dictionary, Class<P> policyClass, BehaviourIndex<ClassBehaviourBinding> index, long tryLockTimeout)
{
// Get list of all pre-registered behaviours for the policy and
// ensure they are valid.
@@ -64,6 +64,7 @@ public class ClassPolicyDelegate<P extends ClassPolicy>
// Rely on cached implementation of policy factory
// Note: Could also use PolicyFactory (without caching)
this.factory = new CachedPolicyFactory<ClassBehaviourBinding, P>(policyClass, index);
this.factory.setTryLockTimeout(tryLockTimeout);
this.dictionary = dictionary;
}