mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Dictionary Cache improvements - ensure CMIS Dictionary Registry is MT-aware
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14057 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -150,7 +150,7 @@ public class DictionaryBootstrap implements DictionaryListener
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.repo.dictionary.DictionaryListener#afterInit()
|
||||
@@ -159,6 +159,14 @@ public class DictionaryBootstrap implements DictionaryListener
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.repo.dictionary.DictionaryListener#onDictionaryDestroy()
|
||||
*/
|
||||
public void afterDictionaryDestroy()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the static resource bundles
|
||||
*/
|
||||
|
@@ -147,7 +147,7 @@ public class DictionaryDAOImpl implements DictionaryDAO
|
||||
// initialise empty dictionary & namespaces
|
||||
putCompiledModels(tenantDomain, new HashMap<QName,CompiledModel>());
|
||||
putUriToModels(tenantDomain, new HashMap<String, List<CompiledModel>>());
|
||||
|
||||
|
||||
namespaceDAO.init();
|
||||
|
||||
// populate the dictionary
|
||||
@@ -155,8 +155,8 @@ public class DictionaryDAOImpl implements DictionaryDAO
|
||||
{
|
||||
dictionaryListener.onDictionaryInit();
|
||||
}
|
||||
|
||||
// populate the dictionary
|
||||
|
||||
// notify registered listeners that dictionary has been initialised
|
||||
for (DictionaryListener dictionaryListener : dictionaryListeners)
|
||||
{
|
||||
dictionaryListener.afterDictionaryInit();
|
||||
@@ -177,6 +177,12 @@ public class DictionaryDAOImpl implements DictionaryDAO
|
||||
|
||||
namespaceDAO.destroy();
|
||||
|
||||
// notify registered listeners that dictionary has been destroyed
|
||||
for (DictionaryListener dictionaryDeployer : dictionaryListeners)
|
||||
{
|
||||
dictionaryDeployer.afterDictionaryDestroy();
|
||||
}
|
||||
|
||||
logger.info("Dictionary destroyed");
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -37,6 +37,9 @@ public interface DictionaryListener
|
||||
// callback for (re-)initialising the Dictionary caches
|
||||
public void onDictionaryInit();
|
||||
|
||||
// callback once initialisation is complete
|
||||
// callback once dictionary destroy is complete
|
||||
public void afterDictionaryDestroy();
|
||||
|
||||
// callback once dictionary initialisation is complete
|
||||
public void afterDictionaryInit();
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2008 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -293,6 +293,14 @@ public class DictionaryRepositoryBootstrap extends AbstractLifecycleBean impleme
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.alfresco.repo.dictionary.DictionaryListener#onDictionaryDestroy()
|
||||
*/
|
||||
public void afterDictionaryDestroy()
|
||||
{
|
||||
}
|
||||
|
||||
public void initMessages()
|
||||
{
|
||||
if (this.repositoryMessagesLocations != null)
|
||||
|
Reference in New Issue
Block a user