mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Schema script auto-application
Split NodeStatus transaction out into a shared entity and also record server info Beginnings of changes required for index rebuilding, both full and incremental git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3654 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
<import resource="classpath:alfresco/authentication-services-context.xml" />
|
||||
<import resource="classpath:alfresco/policy-context.xml" />
|
||||
<import resource="classpath:alfresco/import-export-context.xml" />
|
||||
<import resource="classpath:alfresco/workflow-context.xml" />
|
||||
<import resource="classpath:alfresco/bootstrap-context.xml" />
|
||||
<import resource="classpath:alfresco/workflow-context.xml" />
|
||||
<import resource="classpath:alfresco/jcr-api-context.xml" />
|
||||
<import resource="classpath:alfresco/audit-services-context.xml" />
|
||||
<import resource="classpath*:alfresco/patch/*-context.xml" />
|
||||
|
@@ -25,6 +25,31 @@
|
||||
|
||||
<beans>
|
||||
|
||||
<!-- ensure that the schema is bootstrapped -->
|
||||
<bean id="schemaBootstrap" class="org.alfresco.repo.domain.schema.SchemaBootstrap" >
|
||||
<property name="localSessionFactory">
|
||||
<ref bean="&sessionFactory"></ref> <!-- inject the actual factory, not a session -->
|
||||
</property>
|
||||
<property name="updateSchema">
|
||||
<value>${db.schema.update}</value>
|
||||
</property>
|
||||
<property name="postCreateScriptUrls">
|
||||
<list>
|
||||
<value>classpath:alfresco/dbscripts/create/1.4/${db.script.dialect}/sample.sql</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="validateUpdateScriptPatches">
|
||||
<list>
|
||||
</list>
|
||||
</property>
|
||||
<property name="applyUpdateScriptPatches">
|
||||
<list>
|
||||
<ref bean="patch.schemaUpdateScript-V1.4-1" />
|
||||
<ref bean="patch.schemaUpdateScript-V1.4-2" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Bootstrap Files -->
|
||||
|
||||
<bean id="systemInfoBootstrap" parent="systemInfoImporter">
|
||||
|
@@ -60,9 +60,6 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- use around method calls to debug - see class comments for details -->
|
||||
<bean id="methodCallLogAdvice" class="org.alfresco.util.debug.MethodCallLogAdvice" />
|
||||
|
||||
<!-- -->
|
||||
<!-- I18N -->
|
||||
<!-- -->
|
||||
@@ -79,6 +76,7 @@
|
||||
<value>alfresco.messages.template-service</value>
|
||||
<value>alfresco.messages.lock-service</value>
|
||||
<value>alfresco.messages.patch-service</value>
|
||||
<value>alfresco.messages.schema-update</value>
|
||||
<value>alfresco.messages.webdav-messages</value>
|
||||
</list>
|
||||
</property>
|
||||
|
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Hibernate configuration
|
||||
#
|
||||
hibernate.jdbc.use_streams_for_binary=true
|
||||
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
|
||||
|
||||
hibernate.jdbc.use_streams_for_binary=true
|
||||
hibernate.show_sql=false
|
||||
hibernate.hbm2ddl.auto=update
|
||||
hibernate.cache.use_query_cache=true
|
||||
hibernate.max_fetch_depth=10
|
||||
hibernate.cache.provider_class=org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# Sample database connection properties
|
||||
#
|
||||
|
||||
#db.schema.update=true
|
||||
#db.username=alfresco
|
||||
#db.password=alfresco
|
||||
#db.pool.initial=10
|
||||
|
@@ -30,6 +30,9 @@
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="sessionFactoryBase" abstract="true">
|
||||
<property name="schemaUpdate">
|
||||
<value>false</value>
|
||||
</property>
|
||||
<property name="mappingResources">
|
||||
<list>
|
||||
<!-- -->
|
||||
@@ -38,6 +41,7 @@
|
||||
|
||||
<value>org/alfresco/repo/domain/hibernate/Node.hbm.xml</value>
|
||||
<value>org/alfresco/repo/domain/hibernate/Store.hbm.xml</value>
|
||||
<value>org/alfresco/repo/domain/hibernate/Transaction.hbm.xml</value>
|
||||
<value>org/alfresco/repo/domain/hibernate/VersionCount.hbm.xml</value>
|
||||
<value>org/alfresco/repo/domain/hibernate/AppliedPatch.hbm.xml</value>
|
||||
<value>org/alfresco/repo/domain/hibernate/Permission.hbm.xml</value>
|
||||
@@ -150,6 +154,8 @@
|
||||
<prop key="org.alfresco.repo.domain.hibernate.ChildAssocImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.NodeAssocImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.StoreImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.TransactionImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.ServerImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.VersionCountImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.AppliedPatchImpl">${cache.strategy}</prop>
|
||||
|
||||
@@ -204,7 +210,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="nodeDaoServiceImpl" class="org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl" >
|
||||
<bean id="nodeDaoServiceImpl" class="org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl">
|
||||
<property name="sessionFactory">
|
||||
<ref bean="sessionFactory" />
|
||||
</property>
|
||||
|
@@ -22,17 +22,11 @@
|
||||
<property name="nodeService">
|
||||
<ref bean="nodeService" />
|
||||
</property>
|
||||
<property name="stores">
|
||||
<list>
|
||||
<value>workspace://SpacesStore</value>
|
||||
<value>workspace://lightWeightVersionStore</value>
|
||||
<value>user://alfrescoUserStore</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- full node index recovery -->
|
||||
<bean id="indexRecoveryComponent" class="org.alfresco.repo.node.index.FullIndexRecoveryComponent" parent="indexRecoveryComponentBase">
|
||||
<!-- Properties controlling full index rebuilding / tracking -->
|
||||
<property name="executeFullRecovery">
|
||||
<value>false</value> <!-- enable this to start the full index recovery -->
|
||||
</property>
|
||||
@@ -47,4 +41,43 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- attempt to reindex content that was missing before -->
|
||||
<!--
|
||||
<bean id="missingContentReindexComponent" class="org.alfresco.repo.node.index.MissingContentReindexComponent" parent="indexRecoveryComponentBase">
|
||||
<property name="runContinuously">
|
||||
<value>false</value>
|
||||
</property>
|
||||
<property name="waitTime">
|
||||
<value>300000</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="missingContentReindexTrigger" class="org.alfresco.util.TriggerBean">
|
||||
<property name="jobDetail">
|
||||
<bean id="IndexRecoveryJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
|
||||
<property name="jobClass">
|
||||
<value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
|
||||
</property>
|
||||
<property name="jobDataAsMap">
|
||||
<map>
|
||||
<entry key="missingContentReindexComponent">
|
||||
<ref bean="missingContentReindexComponent" />
|
||||
</entry>
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="startDelay">
|
||||
<value>60000</value>
|
||||
</property>
|
||||
<property name="repeatCount">
|
||||
<value>0</value>
|
||||
</property>
|
||||
<property name="scheduler">
|
||||
<ref bean="schedulerFactory" />
|
||||
</property>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
|
||||
</beans>
|
@@ -16,6 +16,9 @@ patch.general.property_not_set=Patch property ''{0}'' has not been set on this p
|
||||
|
||||
# Individual patch messages
|
||||
|
||||
patch.marker.description=Marker patch to record installations and upgrades
|
||||
patch.marker.result=Marker patch applied
|
||||
|
||||
patch.savedSearchesFolder.description=Ensures the existence of the 'Saved Searches' folder.
|
||||
patch.savedSearchesFolder.result.exists=The saved searches folder already exists: {0}
|
||||
patch.savedSearchesFolder.result.created=The saved searches folder was successfully created: {0}
|
||||
|
8
config/alfresco/messages/schema-update.properties
Normal file
8
config/alfresco/messages/schema-update.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
# Schema update messages
|
||||
|
||||
schema.update.msg.executing_script=Executing schema upgrade script: {0}
|
||||
schema.update.err.update_failed=Schema auto-update failed
|
||||
schema.update.err.validation_failed=Schema validation failed
|
||||
schema.update.err.update_script_not_run=The following schema upgrade script needs to be executed manually: {0}
|
||||
schema.update.err.script_not_found=The schema script could not be found at location {0}
|
||||
schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}).
|
@@ -441,12 +441,12 @@
|
||||
|
||||
<bean id="patch.schemaUpdateScript-V1.4-1" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||
<property name="id"><value>patch.schemaUpdateScript-V1.4-1</value></property>
|
||||
<property name="description"><value>patch.patch.schemaUpgradeScriptPatch.description</value></property>
|
||||
<property name="description"><value>patch.schemaUpgradeScript.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>19</value></property>
|
||||
<property name="targetSchema"><value>20</value></property>
|
||||
<property name="scriptName">
|
||||
<value>AlfrescoSchemaUpdate-1.4-1-xxx.sql</value>
|
||||
<property name="scriptUrl">
|
||||
<value>classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-1.sql</value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="patch.uniqueChildName" class="org.alfresco.repo.admin.patch.impl.UniqueChildNamePatch" parent="basePatch" >
|
||||
@@ -472,5 +472,21 @@
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="patch.schemaUpdateScript-V1.4-2" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||
<property name="id"><value>patch.schemaUpdateScript-V1.4-2</value></property>
|
||||
<property name="description"><value>patch.schemaUpgradeScript.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>20</value></property>
|
||||
<property name="targetSchema"><value>21</value></property>
|
||||
<property name="scriptUrl">
|
||||
<value>classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-2.sql</value>
|
||||
</property>
|
||||
<!-- dependent on upgrade script 1.4-1 having being run -->
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.schemaUpdateScript-V1.4-1" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
@@ -56,6 +56,7 @@ lucene.lock.poll.interval=100
|
||||
|
||||
# Database configuration
|
||||
|
||||
db.schema.update=true
|
||||
db.driver=org.gjt.mm.mysql.Driver
|
||||
db.name=alfresco
|
||||
db.url=jdbc:mysql:///${db.name}
|
||||
|
@@ -19,4 +19,4 @@ version.build=@build-number@
|
||||
|
||||
# Schema number
|
||||
|
||||
version.schema=20
|
||||
version.schema=21
|
||||
|
Reference in New Issue
Block a user