mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
12896: Merged DEV/LIVECYCLE-3.1 to V3.1 12859: Merged V2.1-A to DEV/LIVECYCLE-3.1 9040: Fixed WebService client code to take dynamic webapp name 12865: Merged V2.1-A to DEV/LIVECYCLE-3.1 9040 integration: Added 'repository.webapp' (defaults to 'alfresco') for Webservice clients 12868: JAWS-142: Adobe LC JGroups Clustering - JGroups communications and factories remain in 'repository' project - JGroups EHCache integration moved to 'enterpriserepository' project - Default factory for EHCache cluster config is aware of open-enterprise split - Default EHCache config still works as normal - JGroups EHCache config still enabled by setting 'alfresco.cluster.name' property 12887: Merged V2.1-A to DEV\LIVECYCLE-31 8619: Hard-coded "admin" usage in non-test classes only 12906: Re-deleted files after merge mix-up ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.1:r12896,12906 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13524 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,10 +25,12 @@
|
||||
package org.alfresco.repo.cache;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
import net.sf.ehcache.CacheException;
|
||||
import net.sf.ehcache.CacheManager;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.util.PropertyCheck;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -65,8 +67,17 @@ public class EhCacheManagerFactoryBean implements FactoryBean, InitializingBean,
|
||||
{
|
||||
PropertyCheck.mandatory(this, "configLocation", configLocation);
|
||||
|
||||
logger.info("Initializing EHCache CacheManager");
|
||||
this.cacheManager = new CacheManager(this.configLocation.getURL());
|
||||
// Double-check the config location or EHCache will throw an NPE
|
||||
try
|
||||
{
|
||||
URL configUrl = this.configLocation.getURL();
|
||||
logger.info("Initializing EHCache CacheManager using URL: " + configLocation);
|
||||
this.cacheManager = new CacheManager(configUrl);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unabled to read EHCache configuration file at " + configLocation, e);
|
||||
}
|
||||
}
|
||||
|
||||
public Object getObject()
|
||||
@@ -74,6 +85,7 @@ public class EhCacheManagerFactoryBean implements FactoryBean, InitializingBean,
|
||||
return this.cacheManager;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Class getObjectType()
|
||||
{
|
||||
return (this.cacheManager != null ? this.cacheManager.getClass() : CacheManager.class);
|
||||
|
Reference in New Issue
Block a user