Fix MT context sample - follow-on to r17624 (CHK-10430)

- found by Kevin R

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19271 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2010-03-12 23:19:23 +00:00
parent eb20aa587b
commit 99bae15cae
4 changed files with 118 additions and 114 deletions

View File

@@ -3,28 +3,28 @@
<beans> <beans>
<!-- <!--
Bootstrap Data: Prototype beans for the per-tenant bootstrap. Bootstrap Data: Prototype beans for the per-tenant bootstrap.
These are fetched by the MultiTAdminServiceImpl when new tenant is created. These are fetched by the MultiTAdminServiceImpl when new tenant is created.
--> -->
<bean id="userBootstrap-mt" parent="userBootstrap-base" singleton="false" /> <bean id="userBootstrap-mt" parent="userBootstrap-base" singleton="false" />
<bean id="systemBootstrap-mt" parent="systemBootstrap-base" singleton="false" /> <bean id="systemBootstrap-mt" parent="systemBootstrap-base" singleton="false" />
<bean id="versionBootstrap-mt" parent="versionBootstrap-base" singleton="false" /> <bean id="versionBootstrap-mt" parent="versionBootstrap-base" singleton="false" />
<bean id="version2Bootstrap-mt" parent="version2Bootstrap-base" singleton="false" /> <bean id="version2Bootstrap-mt" parent="version2Bootstrap-base" singleton="false" />
<bean id="spacesArchiveBootstrap-mt" parent="spacesArchiveBootstrap-base" singleton="false" /> <bean id="spacesArchiveBootstrap-mt" parent="spacesArchiveBootstrap-base" singleton="false" />
<bean id="spacesBootstrap-mt" parent="spacesBootstrap-base" singleton="false" /> <bean id="spacesBootstrap-mt" parent="spacesBootstrap-base" singleton="false" />
<!-- --> <!-- -->
<!-- MT Admin Service Implementation --> <!-- MT Admin Service Implementation -->
<!-- --> <!-- -->
<bean id="tenantAdminService" parent="baseMultiTAdminService" /> <bean id="tenantAdminService" parent="baseMultiTAdminService" />
<bean id="tenantInterpreter" class="org.alfresco.repo.tenant.TenantInterpreter" parent="interpreterBase"> <bean id="tenantInterpreter" class="org.alfresco.repo.tenant.TenantInterpreter" parent="interpreterBase">
<property name="tenantAdminService" ref="tenantAdminService"/> <property name="tenantAdminService" ref="tenantAdminService"/>
<property name="tenantService" ref="tenantService"/> <property name="tenantService" ref="tenantService"/>
<property name="authenticationService" ref="AuthenticationService"/> <property name="authenticationService" ref="AuthenticationService"/>
<property name="baseAdminUsername"><value>${alfresco_user_store.adminusername}</value></property> <property name="baseAdminUsername"><value>${alfresco_user_store.adminusername}</value></property>
</bean> </bean>
<bean id="tenantInterpreterHelp" class="org.alfresco.i18n.ResourceBundleBootstrapComponent"> <bean id="tenantInterpreterHelp" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">

View File

@@ -2,61 +2,64 @@
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'> <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans> <beans>
<!-- ======================================= --> <!-- ======================================= -->
<!-- Tenant Routing File Content Store Cache --> <!-- Tenant Routing File Content Store Cache -->
<!-- ======================================= --> <!-- ======================================= -->
<bean name="tenantFileStoresCache" class="org.alfresco.repo.cache.EhCacheAdapter"> <bean name="tenantFileStoresCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache"> <property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" > <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheManager"> <property name="cacheManager">
<ref bean="internalEHCacheManager" /> <ref bean="internalEHCacheManager" />
</property> </property>
<property name="cacheName"> <property name="cacheName">
<value>org.alfresco.cache.tenantFileStoresCache</value> <value>org.alfresco.cache.tenantFileStoresCache</value>
</property> </property>
</bean> </bean>
</property> </property>
</bean> </bean>
<!-- --> <!-- -->
<!-- Tenant Routing File Content Store --> <!-- Tenant Routing File Content Store -->
<!-- --> <!-- -->
<bean id="tenantFileContentStore" class="org.alfresco.repo.content.TenantRoutingFileContentStore" init-method="init"> <bean id="tenantFileContentStore" class="org.alfresco.repo.content.TenantRoutingFileContentStore" init-method="init">
<property name="defaultRootDir"> <property name="applicationEventPublisher">
<value>${dir.contentstore}</value> <ref bean="applicationEventPublisher" />
</property> </property>
<property name="tenantService"> <property name="defaultRootDir">
<ref bean="tenantService" /> <value>${dir.contentstore}</value>
</property> </property>
<property name="storesCache"> <property name="tenantService">
<ref bean="tenantFileStoresCache" /> <ref bean="tenantService" />
</property> </property>
</bean> <property name="storesCache">
<ref bean="tenantFileStoresCache" />
<!-- override content store cleaner to use tenant routing file content store --> </property>
<!-- Performs the content cleanup --> </bean>
<!-- override content store cleaner to use tenant routing file content store -->
<!-- Performs the content cleanup -->
<bean id="eagerContentStoreCleaner" class="org.alfresco.repo.content.cleanup.EagerContentStoreCleaner" init-method="init"> <bean id="eagerContentStoreCleaner" class="org.alfresco.repo.content.cleanup.EagerContentStoreCleaner" init-method="init">
<property name="eagerOrphanCleanup" > <property name="eagerOrphanCleanup" >
<value>${system.content.eagerOrphanCleanup}</value> <value>${system.content.eagerOrphanCleanup}</value>
</property> </property>
<property name="stores" > <property name="stores" >
<list> <list>
<ref bean="tenantFileContentStore" /> <ref bean="tenantFileContentStore" />
</list> </list>
</property> </property>
<property name="listeners" > <property name="listeners" >
<ref bean="deletedContentBackupListeners" /> <ref bean="deletedContentBackupListeners" />
</property> </property>
</bean> </bean>
<!-- override content service to use tenant routing file content store --> <!-- override content service to use tenant routing file content store -->
<bean id="contentService" parent="baseContentService"> <bean id="contentService" parent="baseContentService">
<property name="store"> <property name="store">
<ref bean="tenantFileContentStore" /> <ref bean="tenantFileContentStore" />
</property> </property>
</bean> </bean>
</beans> </beans>

View File

@@ -21,9 +21,10 @@
<bean id="tenantAdminService" parent="baseMultiTAdminService" /> <bean id="tenantAdminService" parent="baseMultiTAdminService" />
<bean id="tenantInterpreter" class="org.alfresco.repo.tenant.TenantInterpreter" parent="interpreterBase"> <bean id="tenantInterpreter" class="org.alfresco.repo.tenant.TenantInterpreter" parent="interpreterBase">
<property name="tenantAdminService" ref="tenantAdminService"/> <property name="tenantAdminService" ref="tenantAdminService"/>
<property name="tenantService" ref="tenantService"/> <property name="tenantService" ref="tenantService"/>
<property name="authenticationService" ref="AuthenticationService"/> <property name="authenticationService" ref="AuthenticationService"/>
<property name="baseAdminUsername"><value>${alfresco_user_store.adminusername}</value></property>
</bean> </bean>
<bean id="tenantInterpreterHelp" class="org.alfresco.i18n.ResourceBundleBootstrapComponent"> <bean id="tenantInterpreterHelp" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
@@ -34,4 +35,4 @@
</property> </property>
</bean> </bean>
</beans> </beans>

View File

@@ -2,64 +2,64 @@
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'> <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans> <beans>
<!-- ======================================= --> <!-- ======================================= -->
<!-- Tenant Routing File Content Store Cache --> <!-- Tenant Routing File Content Store Cache -->
<!-- ======================================= --> <!-- ======================================= -->
<bean name="tenantFileStoresCache" class="org.alfresco.repo.cache.EhCacheAdapter"> <bean name="tenantFileStoresCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache"> <property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" > <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheManager"> <property name="cacheManager">
<ref bean="internalEHCacheManager" /> <ref bean="internalEHCacheManager" />
</property> </property>
<property name="cacheName"> <property name="cacheName">
<value>org.alfresco.cache.tenantFileStoresCache</value> <value>org.alfresco.cache.tenantFileStoresCache</value>
</property> </property>
</bean> </bean>
</property> </property>
</bean> </bean>
<!-- --> <!-- -->
<!-- Tenant Routing File Content Store --> <!-- Tenant Routing File Content Store -->
<!-- --> <!-- -->
<bean id="tenantFileContentStore" class="org.alfresco.repo.content.TenantRoutingFileContentStore" init-method="init"> <bean id="tenantFileContentStore" class="org.alfresco.repo.content.TenantRoutingFileContentStore" init-method="init">
<property name="applicationEventPublisher"> <property name="applicationEventPublisher">
<ref bean="applicationEventPublisher" /> <ref bean="applicationEventPublisher" />
</property>
<property name="defaultRootDir">
<value>${dir.contentstore}</value>
</property>
<property name="tenantService">
<ref bean="tenantService" />
</property>
<property name="storesCache">
<ref bean="tenantFileStoresCache" />
</property> </property>
<property name="defaultRootDir"> </bean>
<value>${dir.contentstore}</value>
</property> <!-- override content store cleaner to use tenant routing file content store -->
<property name="tenantService"> <!-- Performs the content cleanup -->
<ref bean="tenantService" />
</property>
<property name="storesCache">
<ref bean="tenantFileStoresCache" />
</property>
</bean>
<!-- override content store cleaner to use tenant routing file content store -->
<!-- Performs the content cleanup -->
<bean id="eagerContentStoreCleaner" class="org.alfresco.repo.content.cleanup.EagerContentStoreCleaner" init-method="init"> <bean id="eagerContentStoreCleaner" class="org.alfresco.repo.content.cleanup.EagerContentStoreCleaner" init-method="init">
<property name="eagerOrphanCleanup" > <property name="eagerOrphanCleanup" >
<value>${system.content.eagerOrphanCleanup}</value> <value>${system.content.eagerOrphanCleanup}</value>
</property> </property>
<property name="stores" > <property name="stores" >
<list> <list>
<ref bean="tenantFileContentStore" /> <ref bean="tenantFileContentStore" />
</list> </list>
</property> </property>
<property name="listeners" > <property name="listeners" >
<ref bean="deletedContentBackupListeners" /> <ref bean="deletedContentBackupListeners" />
</property> </property>
</bean> </bean>
<!-- override content service to use tenant routing file content store --> <!-- override content service to use tenant routing file content store -->
<bean id="contentService" parent="baseContentService"> <bean id="contentService" parent="baseContentService">
<property name="store"> <property name="store">
<ref bean="tenantFileContentStore" /> <ref bean="tenantFileContentStore" />
</property> </property>
</bean> </bean>
</beans> </beans>