From 7eeb32f30bc6093370d91f94f3ebb22a6881d96d Mon Sep 17 00:00:00 2001 From: cetra3 Date: Tue, 11 Oct 2016 01:37:22 +0100 Subject: [PATCH] Check to see whether repository models are initliased Mirrored from community commit c81600dbfe2006e6ae6531c52704f12d497e4398 --- .../RecordsManagementAdminServiceImpl.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java index c17b74b822..e54dd45166 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/admin/RecordsManagementAdminServiceImpl.java @@ -172,16 +172,18 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas @Override public void onApplicationEvent(ContextRefreshedEvent event) { - transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback() - { - public Void execute() throws Throwable - { - // initialise custom properties - initCustomMap(); - - return null; - } - }); + + if(!isCustomMapInit && getDictionaryService().getAllModels().contains(RM_CUSTOM_MODEL)) { + transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback() { + public Void execute() throws Throwable { + + // initialise custom properties + initCustomMap(); + + return null; + } + }); + } } /**