mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix AR-431, AR-432.
Modified the Repository bootstrap mechanism so it's performed after all other initialisation and the order of bootstrap is explicit. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2414 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
<import resource="classpath:alfresco/index-recovery-context.xml" />
|
||||
<import resource="classpath:alfresco/authority-services-context.xml" />
|
||||
<import resource="classpath:alfresco/authentication-services-context.xml" />
|
||||
<import resource="classpath:alfresco/bootstrap-context.xml" />
|
||||
<import resource="classpath*:alfresco/patch/*-context.xml" />
|
||||
|
||||
<!-- import of general extensions and bean overrides -->
|
||||
|
147
config/alfresco/bootstrap-context.xml
Normal file
147
config/alfresco/bootstrap-context.xml
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
|
||||
<!--
|
||||
Repository Boostrap Sequence.
|
||||
|
||||
This file specifies the initialisation (and order of initialisation) to perform during Repository startup.
|
||||
|
||||
The pattern for adding new initialisation to the bootstrap sequence is as follows:
|
||||
|
||||
1) Develop a bean that implements the Spring interface ApplicationListener
|
||||
2) Place the initialisation logic in the method onApplicationEvent(ApplicationEvent event)...
|
||||
|
||||
public void onApplicationEvent(ApplicationEvent event)
|
||||
{
|
||||
if (event instanceof ContextRefreshedEvent)
|
||||
{
|
||||
// initialisation logic here
|
||||
}
|
||||
}
|
||||
|
||||
3) Add the bean definition to this file - Note: the beans are initialised in the order they are specified.
|
||||
-->
|
||||
|
||||
<beans>
|
||||
|
||||
<!-- Bootstrap Files -->
|
||||
|
||||
<bean id="userBootstrap" parent="userStoreImporter">
|
||||
<property name="bootstrapViews">
|
||||
<list>
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/alfrescoUserStore.xml</prop>
|
||||
</props>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="systemBootstrap" parent="systemStoreImporter">
|
||||
<property name="bootstrapViews">
|
||||
<list>
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/descriptor.xml</prop>
|
||||
</props>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="spacesBootstrap" parent="spacesStoreImporter">
|
||||
<property name="bootstrapViews">
|
||||
<list>
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/categories.xml</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/spaces.xml</prop>
|
||||
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/system.xml</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.guest_home.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/tutorial.xml</prop>
|
||||
<prop key="messages">alfresco/messages/bootstrap-tutorial</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.childname}</prop>
|
||||
<prop key="location">alfresco/templates/software_engineering_project.xml</prop>
|
||||
<prop key="messages">alfresco/messages/bootstrap-templates</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.content.childname}</prop>
|
||||
<prop key="location">alfresco/templates/content_template_examples.xml</prop>
|
||||
</props>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Descriptor Service -->
|
||||
|
||||
<bean id="descriptorComponent" class="org.alfresco.repo.descriptor.DescriptorServiceImpl">
|
||||
<property name="descriptor">
|
||||
<value>classpath:alfresco/version.properties</value>
|
||||
</property>
|
||||
<property name="systemBootstrap">
|
||||
<ref bean="systemBootstrap"/>
|
||||
</property>
|
||||
<property name="transactionService">
|
||||
<ref bean="transactionComponent"/>
|
||||
</property>
|
||||
<property name="namespaceService">
|
||||
<ref bean="namespaceService"/>
|
||||
</property>
|
||||
<property name="nodeService">
|
||||
<ref bean="nodeService"/>
|
||||
</property>
|
||||
<property name="searchService">
|
||||
<ref bean="searchService"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- This component ensures that patches get applied on startup -->
|
||||
|
||||
<bean id="patchExecuter" class="org.alfresco.repo.admin.patch.PatchExecuter">
|
||||
<property name="patchService">
|
||||
<ref bean="PatchService" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- CIFS Server -->
|
||||
|
||||
<bean id="fileServerConfiguration" class="org.alfresco.filesys.server.config.ServerConfiguration" parent="fileServerConfigurationBase">
|
||||
<property name="configService">
|
||||
<ref bean="fileServersConfigService"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="cifsServer" class="org.alfresco.filesys.CIFSServer" destroy-method="stopServer">
|
||||
<constructor-arg>
|
||||
<ref local="fileServerConfiguration"/>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
<!-- FTP Server -->
|
||||
|
||||
<bean id="ftpServer" class="org.alfresco.filesys.FTPServer" destroy-method="stopServer">
|
||||
<constructor-arg>
|
||||
<ref local="fileServerConfiguration"/>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
<!-- Startup Message -->
|
||||
|
||||
<bean id="startupLog" class="org.alfresco.repo.descriptor.DescriptorStartupLog">
|
||||
<property name="descriptorService">
|
||||
<ref local="descriptorComponent"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://www.alfresco.org/model/application/1.0">
|
||||
|
||||
<!-- NOTE: all replaced properties referenced from repository.properties file must also be
|
||||
mapped in the application-context.xml importerBootstrap/configuration section -->
|
||||
mapped in the bootstrap-context.xml spacesBootstrap/configuration section -->
|
||||
<cm:folder view:childName="${spaces.company_home.childname}">
|
||||
<view:acl view:inherit="false">
|
||||
<view:ace view:access="ALLOWED">
|
||||
|
@@ -4,29 +4,6 @@
|
||||
<!-- Core and miscellaneous bean definitions -->
|
||||
<beans>
|
||||
|
||||
<!-- Descriptor Service -->
|
||||
|
||||
<bean id="descriptorComponent" class="org.alfresco.repo.descriptor.DescriptorServiceImpl" init-method="init">
|
||||
<property name="descriptor">
|
||||
<value>classpath:alfresco/version.properties</value>
|
||||
</property>
|
||||
<property name="systemBootstrap">
|
||||
<ref local="systemBootstrap"/>
|
||||
</property>
|
||||
<property name="transactionService">
|
||||
<ref bean="transactionComponent"/>
|
||||
</property>
|
||||
<property name="namespaceService">
|
||||
<ref bean="namespaceService"/>
|
||||
</property>
|
||||
<property name="nodeService">
|
||||
<ref bean="nodeService"/>
|
||||
</property>
|
||||
<property name="searchService">
|
||||
<ref bean="searchService"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- -->
|
||||
<!-- PERSISTENCE -->
|
||||
<!-- -->
|
||||
@@ -642,7 +619,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="importerComponent" class="org.alfresco.repo.importer.ImporterComponent" depends-on="nodeIndexer, auditableAspect">
|
||||
<bean id="importerComponent" class="org.alfresco.repo.importer.ImporterComponent">
|
||||
<!-- For now, hard-wire the view parser -->
|
||||
<property name="namespaceService">
|
||||
<ref bean="NamespaceService" />
|
||||
@@ -679,7 +656,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="storeImporter" class="org.alfresco.repo.importer.ImporterBootstrap" abstract="true" init-method="bootstrap">
|
||||
<bean id="storeImporter" class="org.alfresco.repo.importer.ImporterBootstrap" abstract="true">
|
||||
<property name="transactionService">
|
||||
<ref bean="transactionComponent"/>
|
||||
</property>
|
||||
@@ -757,65 +734,6 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Bootstrap Files -->
|
||||
|
||||
<bean id="userBootstrap" parent="userStoreImporter">
|
||||
<property name="bootstrapViews">
|
||||
<list>
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/alfrescoUserStore.xml</prop>
|
||||
</props>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="systemBootstrap" parent="systemStoreImporter" depends-on="userBootstrap">
|
||||
<property name="bootstrapViews">
|
||||
<list>
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/descriptor.xml</prop>
|
||||
</props>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="importerBootstrap" parent="spacesStoreImporter" depends-on="systemBootstrap, versionBootstrap">
|
||||
<property name="bootstrapViews">
|
||||
<list>
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/categories.xml</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/spaces.xml</prop>
|
||||
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/system.xml</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.guest_home.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/tutorial.xml</prop>
|
||||
<prop key="messages">alfresco/messages/bootstrap-tutorial</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.childname}</prop>
|
||||
<prop key="location">alfresco/templates/software_engineering_project.xml</prop>
|
||||
<prop key="messages">alfresco/messages/bootstrap-templates</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.content.childname}</prop>
|
||||
<prop key="location">alfresco/templates/content_template_examples.xml</prop>
|
||||
</props>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<!-- Exporters -->
|
||||
<bean id="exporterComponent" class="org.alfresco.repo.exporter.ExporterComponent">
|
||||
<property name="namespaceService">
|
||||
|
@@ -33,6 +33,10 @@
|
||||
<filesystem name="Alfresco">
|
||||
<store>workspace://SpacesStore</store>
|
||||
<rootPath>/app:company_home</rootPath>
|
||||
<urlFile>
|
||||
<filename>__AlfrescoClient.url</filename>
|
||||
<webpath>http://localhost:8080/alfresco/</webpath>
|
||||
</urlFile>
|
||||
<!--
|
||||
<accessControl default="Write">
|
||||
<user name="admin" access="Write"/>
|
||||
@@ -67,4 +71,5 @@
|
||||
-->
|
||||
</config>
|
||||
|
||||
|
||||
</alfresco-config>
|
||||
|
@@ -20,9 +20,7 @@
|
||||
<!-- File Server Configuration -->
|
||||
<bean id="fileServerConfigurationBase"
|
||||
abstract="true"
|
||||
init-method="init"
|
||||
destroy-method="closeConfiguration"
|
||||
depends-on="importerBootstrap">
|
||||
destroy-method="closeConfiguration">
|
||||
<property name="authenticationManager">
|
||||
<ref bean="authenticationManager"/>
|
||||
</property>
|
||||
@@ -46,28 +44,6 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="fileServerConfiguration"
|
||||
class="org.alfresco.filesys.server.config.ServerConfiguration"
|
||||
parent="fileServerConfigurationBase" >
|
||||
<property name="configService">
|
||||
<ref bean="fileServersConfigService"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- CIFS Server -->
|
||||
<bean id="cifsServer" class="org.alfresco.filesys.CIFSServer" init-method="startServer" destroy-method="stopServer" depends-on="importerBootstrap">
|
||||
<constructor-arg>
|
||||
<ref bean="fileServerConfiguration"/>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
<!-- FTP Server -->
|
||||
<bean id="ftpServer" class="org.alfresco.filesys.FTPServer" init-method="startServer" destroy-method="stopServer" depends-on="importerBootstrap">
|
||||
<constructor-arg>
|
||||
<ref bean="fileServerConfiguration"/>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
<!-- Filesystem Interface -->
|
||||
<bean id="contentDiskDriver" class="org.alfresco.filesys.smb.server.repo.ContentDiskDriver" >
|
||||
<constructor-arg>
|
||||
|
@@ -80,7 +80,7 @@
|
||||
<bean id="patch.savedSearches.Base" abstract="true" parent="basePatch" >
|
||||
<!-- helper beans for execution -->
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="importerBootstrap" />
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="namespaceService">
|
||||
<ref bean="namespaceService" />
|
||||
@@ -164,7 +164,7 @@
|
||||
<ref bean="permissionService"/>
|
||||
</property>
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="importerBootstrap" />
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="namespaceService">
|
||||
<ref bean="namespaceService" />
|
||||
@@ -185,15 +185,4 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- This component ensures that patches get applied on startup -->
|
||||
<!-- The order is important here. All the self-registering patches must be defined before this bean -->
|
||||
<bean id="patchExecuter"
|
||||
class="org.alfresco.repo.admin.patch.PatchExecuter"
|
||||
depends-on="importerBootstrap"
|
||||
init-method="applyOutstandingPatches">
|
||||
<property name="patchService">
|
||||
<ref bean="PatchService" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
Reference in New Issue
Block a user