First-cut dynamic Dictionary & Namespaces - updated caches to be cluster-aware & tenant-aware

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6675 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-09-04 14:23:55 +00:00
parent d51344044d
commit 6e854e6166
16 changed files with 1992 additions and 238 deletions

View File

@@ -345,4 +345,137 @@
</property>
</bean>
<!-- ===================================== -->
<!-- Dictionary / Namespace Caches -->
<!-- ===================================== -->
<!-- The cross-transaction shared cache for In-Memory UriToModels -->
<bean name="uriToModelsSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheManager">
<ref bean="internalEHCacheManager" />
</property>
<property name="cacheName">
<value>org.alfresco.cache.uriToModelsCache</value>
</property>
</bean>
</property>
</bean>
<!-- The transactional cache for In-Memory UriToModels -->
<bean name="uriToModelsCache" class="org.alfresco.repo.cache.TransactionalCache">
<property name="sharedCache">
<ref bean="uriToModelsSharedCache" />
</property>
<property name="cacheManager" >
<ref bean="transactionalEHCacheManager" />
</property>
<property name="name">
<value>org.alfresco.uriToModelsTransactionalCache</value>
</property>
<property name="maxCacheSize">
<value>10</value>
</property>
</bean>
<!-- The cross-transaction shared cache for In-Memory CompiledModels -->
<bean name="compiledModelsSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheManager">
<ref bean="internalEHCacheManager" />
</property>
<property name="cacheName">
<value>org.alfresco.cache.compiledModelsCache</value>
</property>
</bean>
</property>
</bean>
<!-- The transactional cache for In-Memory CompiledModels -->
<bean name="compiledModelsCache" class="org.alfresco.repo.cache.TransactionalCache">
<property name="sharedCache">
<ref bean="compiledModelsSharedCache" />
</property>
<property name="cacheManager" >
<ref bean="transactionalEHCacheManager" />
</property>
<property name="name">
<value>org.alfresco.compiledModelsTransactionalCache</value>
</property>
<property name="maxCacheSize">
<value>10</value>
</property>
</bean>
<!-- The cross-transaction shared cache for In-Memory Namespace Uris -->
<bean name="urisSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheManager">
<ref bean="internalEHCacheManager" />
</property>
<property name="cacheName">
<value>org.alfresco.cache.urisCache</value>
</property>
</bean>
</property>
</bean>
<!-- The transactional cache for In-Memory Namespace Uris -->
<bean name="urisCache" class="org.alfresco.repo.cache.TransactionalCache">
<property name="sharedCache">
<ref bean="urisSharedCache" />
</property>
<property name="cacheManager" >
<ref bean="transactionalEHCacheManager" />
</property>
<property name="name">
<value>org.alfresco.urisTransactionalCache</value>
</property>
<property name="maxCacheSize">
<value>10</value>
</property>
</bean>
<!-- The cross-transaction shared cache for In-Memory Namespace Prefixes -->
<bean name="prefixesSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheManager">
<ref bean="internalEHCacheManager" />
</property>
<property name="cacheName">
<value>org.alfresco.cache.prefixesCache</value>
</property>
</bean>
</property>
</bean>
<!-- The transactional cache for In-Memory Namespace Prefixes -->
<bean name="prefixesCache" class="org.alfresco.repo.cache.TransactionalCache">
<property name="sharedCache">
<ref bean="prefixesSharedCache" />
</property>
<property name="cacheManager" >
<ref bean="transactionalEHCacheManager" />
</property>
<property name="name">
<value>org.alfresco.prefixesTransactionalCache</value>
</property>
<property name="maxCacheSize">
<value>10</value>
</property>
</bean>
</beans>

View File

@@ -600,7 +600,19 @@
<!-- Data Dictionary -->
<!-- -->
<bean id="namespaceDAO" class="org.alfresco.repo.dictionary.NamespaceDAOImpl" />
<bean id="namespaceDAO" class="org.alfresco.repo.dictionary.NamespaceDAOImpl">
<property name="tenantService">
<ref bean="tenantService"/>
</property>
<property name="urisCache">
<ref bean="urisCache"/>
</property>
<property name="prefixesCache">
<ref bean="prefixesCache"/>
</property>
</bean>
<bean id="dictionaryModelType" class="org.alfresco.repo.dictionary.DictionaryModelType" init-method="init">
<property name="dictionaryDAO">
@@ -624,6 +636,15 @@
<constructor-arg index="0">
<ref bean="namespaceDAO" />
</constructor-arg>
<property name="tenantService">
<ref bean="tenantService"/>
</property>
<property name="uriToModelsCache">
<ref bean="uriToModelsCache"/>
</property>
<property name="compiledModelsCache">
<ref bean="compiledModelsCache"/>
</property>
</bean>
<bean id="dictionaryService" class="org.alfresco.repo.dictionary.DictionaryComponent" depends-on="dictionaryBootstrap">
@@ -641,6 +662,9 @@
<bean id="dictionaryModelBootstrap" class="org.alfresco.repo.dictionary.DictionaryBootstrap" init-method="bootstrap" abstract="true">
<property name="dictionaryDAO"><ref local="dictionaryDAO"/></property>
<property name="tenantService">
<ref bean="tenantService"/>
</property>
</bean>
<bean id="dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="resourceBundles">
@@ -690,24 +714,6 @@
</list>
</property>
</bean>
<bean id="dictionaryRepositoryBootstrap" class="org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap" init-method="bootstrap">
<property name="dictionaryDAO">
<ref local="dictionaryDAO"/>
</property>
<property name="contentService">
<ref bean="contentService"/>
</property>
<property name="searchService">
<ref bean="searchService"/>
</property>
<property name="transactionService">
<ref bean="transactionService"/>
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponent"/>
</property>
</bean>
<!-- -->
<!-- Copy Service -->

View File

@@ -354,4 +354,34 @@
overflowToDisk="false"
/>
<!-- Dictionary / Namespace (tenant-based) -->
<cache
name="org.alfresco.cache.uriToModelsCache"
maxElementsInMemory="100"
eternal="true"
overflowToDisk="false"
/>
<cache
name="org.alfresco.cache.compiledModelsCache"
maxElementsInMemory="100"
eternal="true"
overflowToDisk="false"
/>
<cache
name="org.alfresco.cache.urisCache"
maxElementsInMemory="100"
eternal="true"
overflowToDisk="false"
/>
<cache
name="org.alfresco.cache.prefixesCache"
maxElementsInMemory="100"
eternal="true"
overflowToDisk="false"
/>
</ehcache>

View File

@@ -650,6 +650,70 @@
</cache>
<!-- Dictionary / Namespace (tenant-based) -->
<cache
name="org.alfresco.cache.uriToModelsCache"
maxElementsInMemory="100"
eternal="true"
overflowToDisk="false">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicatePuts = false,
replicateUpdates = true,
replicateRemovals = true,
replicateUpdatesViaCopy = false,
replicateAsynchronously = false"/>
</cache>
<cache
name="org.alfresco.cache.compiledModelsCache"
maxElementsInMemory="100"
eternal="true"
overflowToDisk="false">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicatePuts = false,
replicateUpdates = true,
replicateRemovals = true,
replicateUpdatesViaCopy = false,
replicateAsynchronously = false"/>
</cache>
<cache
name="org.alfresco.cache.urisCache"
maxElementsInMemory="100"
eternal="true"
overflowToDisk="false">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicatePuts = false,
replicateUpdates = true,
replicateRemovals = true,
replicateUpdatesViaCopy = false,
replicateAsynchronously = false"/>
</cache>
<cache
name="org.alfresco.cache.prefixesCache"
maxElementsInMemory="100"
eternal="true"
overflowToDisk="false">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicatePuts = false,
replicateUpdates = true,
replicateRemovals = true,
replicateUpdatesViaCopy = false,
replicateAsynchronously = false"/>
</cache>
</ehcache>