mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ACE-2487- Activating Duplicate Model in Cloud Causes Infinite Registration Loop
Kludge - disable all dynamic models - build will go red. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@79377 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -26,6 +26,7 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.CopyOnWriteArraySet;
|
import java.util.concurrent.CopyOnWriteArraySet;
|
||||||
|
|
||||||
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.repo.content.ContentServicePolicies;
|
import org.alfresco.repo.content.ContentServicePolicies;
|
||||||
import org.alfresco.repo.lock.JobLockService;
|
import org.alfresco.repo.lock.JobLockService;
|
||||||
@@ -255,16 +256,20 @@ public class DictionaryModelType implements ContentServicePolicies.OnContentUpda
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private void queueModel(NodeRef nodeRef)
|
private void queueModel(NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
Set<NodeRef> pendingModels = (Set<NodeRef>)AlfrescoTransactionSupport.getResource(KEY_PENDING_MODELS);
|
// Temp kludge for ACE-2487 - prevent all dynamic models being loaded.
|
||||||
if (pendingModels == null)
|
// Do not release community or enterprise with this in place.
|
||||||
{
|
throw new AlfrescoRuntimeException("dynamic models not allowed");
|
||||||
//pendingModels = Collections.newSetFromMap(new ConcurrentHashMap()); // Java 6
|
|
||||||
pendingModels = new CopyOnWriteArraySet<NodeRef>();
|
|
||||||
AlfrescoTransactionSupport.bindResource(KEY_PENDING_MODELS, pendingModels);
|
|
||||||
}
|
|
||||||
pendingModels.add(tenantService.getName(nodeRef));
|
|
||||||
|
|
||||||
AlfrescoTransactionSupport.bindListener(this.transactionListener);
|
// Set<NodeRef> pendingModels = (Set<NodeRef>)AlfrescoTransactionSupport.getResource(KEY_PENDING_MODELS);
|
||||||
|
// if (pendingModels == null)
|
||||||
|
// {
|
||||||
|
// //pendingModels = Collections.newSetFromMap(new ConcurrentHashMap()); // Java 6
|
||||||
|
// pendingModels = new CopyOnWriteArraySet<NodeRef>();
|
||||||
|
// AlfrescoTransactionSupport.bindResource(KEY_PENDING_MODELS, pendingModels);
|
||||||
|
// }
|
||||||
|
// pendingModels.add(tenantService.getName(nodeRef));
|
||||||
|
//
|
||||||
|
// AlfrescoTransactionSupport.bindListener(this.transactionListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user