mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
64782: Merged V4.2-BUG-FIX (4.2.2) to HEAD-BUG-FIX (4.3/Cloud) 64028: Merged DEV to V4.2-BUG-FIX (4.2.2) 61306: MNT-10537: BPM Models are filtered for CMIS getTypeDefinition Destroy the dictionary in WorkflowDeployer to clear dictionary registry caches. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@66186 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -251,6 +251,8 @@ public class WorkflowDeployer extends AbstractLifecycleBean
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
userTransaction.begin();
|
userTransaction.begin();
|
||||||
|
|
||||||
|
boolean destroyDictionary = false;
|
||||||
|
|
||||||
// bootstrap the workflow models and static labels (from classpath)
|
// bootstrap the workflow models and static labels (from classpath)
|
||||||
if (models != null && resourceBundles != null && ((models.size() > 0) || (resourceBundles.size() > 0)))
|
if (models != null && resourceBundles != null && ((models.size() > 0) || (resourceBundles.size() > 0)))
|
||||||
@@ -261,6 +263,7 @@ public class WorkflowDeployer extends AbstractLifecycleBean
|
|||||||
dictionaryBootstrap.setModels(models);
|
dictionaryBootstrap.setModels(models);
|
||||||
dictionaryBootstrap.setLabels(resourceBundles);
|
dictionaryBootstrap.setLabels(resourceBundles);
|
||||||
dictionaryBootstrap.bootstrap(); // also registers with dictionary
|
dictionaryBootstrap.bootstrap(); // also registers with dictionary
|
||||||
|
destroyDictionary = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// bootstrap the workflow definitions (from classpath)
|
// bootstrap the workflow definitions (from classpath)
|
||||||
@@ -300,6 +303,7 @@ public class WorkflowDeployer extends AbstractLifecycleBean
|
|||||||
WorkflowDeployment deployment = workflowService.deployDefinition(engineId, workflowResource.getInputStream(),
|
WorkflowDeployment deployment = workflowService.deployDefinition(engineId, workflowResource.getInputStream(),
|
||||||
mimetype, workflowResource.getFilename());
|
mimetype, workflowResource.getFilename());
|
||||||
logDeployment(location, deployment);
|
logDeployment(location, deployment);
|
||||||
|
destroyDictionary = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -324,8 +328,32 @@ public class WorkflowDeployer extends AbstractLifecycleBean
|
|||||||
deploy(nodeRef, false);
|
deploy(nodeRef, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
destroyDictionary = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(destroyDictionary)
|
||||||
|
{
|
||||||
|
RetryingTransactionCallback<Void> work = new RetryingTransactionCallback<Void>()
|
||||||
|
{
|
||||||
|
public Void execute() throws Throwable
|
||||||
|
{
|
||||||
|
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||||
|
{
|
||||||
|
public Object doWork()
|
||||||
|
{
|
||||||
|
dictionaryDAO.destroy();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}, authenticationContext.getSystemUserName());
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
transactionService.getRetryingTransactionHelper().doInTransaction(work, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
userTransaction.commit();
|
userTransaction.commit();
|
||||||
}
|
}
|
||||||
catch(Throwable e)
|
catch(Throwable e)
|
||||||
|
Reference in New Issue
Block a user