Merged V2.2 to HEAD

8083: Merged V2.1 to V2.2
      8066: RM-31 and related issues (ACT-729)
      8068: Fix for AR-1997
   8084: Fixed script error on notify page of invite website user wizard
   8086: Merged V2.1 to V2.2
      8075: Clear()ing a hibernate session, is not always enough to guarantee that transactions not use unbounded amounts of memory
      8076: Turn off test that needs to be fixed real soon now.
   8092: Implementation for:   http://issues.alfresco.com/browse/AR-1744
   8093: Fixed upgrade scripts for V2.1.2 to V2.2 upgrades
   8096: Fix for AWC-1578 and AWC-1814
   8097: Added new indexes missing from scripts and made index names consistent.
   8098: Fix for AWC-1548
   8100: Removed use of QName from alf_permission table
   8102: Fix for AWC-1690
   8103: test was == on id that used to be long but is now a Long


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8476 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-03-10 13:11:50 +00:00
parent 72a90a14f1
commit 3e2311888b
25 changed files with 507 additions and 238 deletions

View File

@@ -170,6 +170,15 @@
<property name="allowGuestLogin">
<value>true</value>
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="personService">
<ref bean="personService" />
</property>
<property name="transactionService">
<ref bean="transactionService" />
</property>
</bean>
@@ -184,6 +193,16 @@
<property name="accept">
<value>true</value>
</property>
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="personService">
<ref bean="personService" />
</property>
<property name="transactionService">
<ref bean="transactionService" />
</property>
</bean>
-->
@@ -374,7 +393,7 @@
<!-- The period for which tickets are valid in XML duration format. -->
<!-- The default is P1H for one hour. -->
<property name="validDuration">
<value>P1H</value>
<value>PT1H</value>
</property>
<!-- Do tickets expire or live for ever? -->
<property name="ticketsExpire">

View File

@@ -130,40 +130,90 @@
<!-- Log4J Hierarchy -->
<bean id="log4jHierarchy" class="org.apache.log4j.jmx.HierarchyDynamicMBean"/>
<bean id="log4JHierarchyInit" class="org.alfresco.repo.admin.Log4JHierarchyInit" init-method="init">
<property name="log4jHierarchy" ref="log4jHierarchy"/>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Incorporate supplementary log4j.properties files -->
<!-- -->
<!-- Properties in these files will augment/override -->
<!-- those within WEB-INF/classes/log4j.properties -->
<!-- -->
<!-- This mechanism allows modules to have their own local -->
<!-- log4j.properties file within: -->
<!-- -->
<!-- WEB-INF/classes/alfresco/module/{module.id}/log4j.properties -->
<!-- -->
<!-- Where: module.id is whatever value is set within the AMP's -->
<!-- 'module.properties' file. -->
<!-- -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<property name="overriding_log4j_properties">
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Supplementary log4j.properties files -->
<!-- -->
<!-- Log4j settings specified here augment/override the webapp's main -->
<!-- log4j configuration file: WEB-INF/classes/log4j.properties -->
<!-- -->
<!-- This allows modules to maintain their own log4j.properties file, -->
<!-- which is typically deployed to: -->
<!-- WEB-INF/classes/alfresco/module/{module.id}/log4j.properties -->
<!-- -->
<!-- Where: module.id is whatever value is set within the AMP's -->
<!-- 'module.properties' file. -->
<!-- -->
<!-- Example: -->
<!-- WEB-INF/classes/alfresco/module/com.example.x.Y/log4j.properties -->
<!-- -->
<!-- Those who wish to configure log4j properties in Alfresco extensions -->
<!-- that aren't packaged as AMP modules can create log4j.properties file -->
<!-- of the form: {name}-log4j.properties and place it within some -->
<!-- alfresco/extension directory on the server's classpath. -->
<!-- -->
<!-- For example: -->
<!-- WEB-INF/classes/alfresco/extension/SIMPLE_EXAMPLE-log4j.properties -->
<!-- -->
<!-- That said, you are strongly encouraged to use the modular form -->
<!-- (i.e.: the first one), and use the AMP mechanism for packaging -->
<!-- whenever possible. This makes customizations easier to manage. -->
<!-- Note: {name}-log4j.properties files override/augment the -->
<!-- log4j.properties files packaged within modules. -->
<!-- -->
<!-- Developers may also wish to maintain a dev-log4j.properties file -->
<!-- outside of the webapp. This allows for changing log4j settings -->
<!-- without touching the "shipping product", or any of a customer's -->
<!-- local settings. Your optional dev-log4j.properties file should be -->
<!-- in some alfresco/extension directory within the server's classpath, -->
<!-- and outside the webapp itself (so you don't accidentally delete it). -->
<!-- Note: the dev-log4j.properties file augments/overrides all others. -->
<!-- -->
<!-- Example: -->
<!-- $TOMCAT_HOME/shared/classes/alfresco/extension/dev-log4j.properties -->
<!-- -->
<!-- -->
<!-- Best practices: -->
<!-- -->
<!-- Local customizations/licences are kept outside of the webapp. -->
<!-- Example: -->
<!-- $TOMCAT_HOME/shared/classes/alfresco/extension/...-log4j.properties -->
<!-- -->
<!-- Shipping config files should be kept/installed within webapp: -->
<!-- Example: -->
<!-- WEB-INF/classes/alfresco/extension/...-log4j.properties -->
<!-- -->
<!-- A dev-log4j.properties file should never be used in an ongoing -->
<!-- during production, nor packaged as a part of any product. -->
<!-- -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<property name="overriding_log4j_properties">
<list>
<!-- NOTE: value entries are listed from lowest precedence to highest. -->
<!-- Installed AMP modules -->
<value>classpath*:alfresco/module/*/log4j.properties</value>
<!-- Other installed extensions -->
<value>classpath*:alfresco/extension/*-log4j.properties</value>
<!-- private developer overrides -->
<value>classpath*:alfresco/extension/dev-log4j.properties</value>
</list>
</property>
</bean>
<bean id="RepoServerMgmt" class="org.alfresco.repo.admin.RepoServerMgmt">
<bean id="RepoServerMgmt" class="org.alfresco.repo.admin.RepoServerMgmt">
<property name="transactionService"><ref bean="transactionService"/></property>
<property name="authenticationService"><ref bean="authenticationService"/></property>
<property name="maxUsers"><value>${server.maxusers}</value></property>
<property name="singleUserOnly"><value>${server.singleuseronly.name}</value></property>
</bean>
<!-- Datasource bean -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">

View File

@@ -7,12 +7,6 @@
-- Please contact support@alfresco.com if you need assistance with the upgrade.
--
-- Add index support for AVM
-- Ideally we would have the indirection in the index but it is too long for mysql which needs additional options
-- CREATE INDEX idx_avm_lyr_indn on avm_nodes (primary_indirection, indirection(128));
-- This matches the hibernate schema and should be good enough for the standard WCM use cases
CREATE INDEX idx_avm_lyr_indn on avm_nodes (primary_indirection);
CREATE TABLE alf_acl_change_set (
id BIGINT NOT NULL AUTO_INCREMENT,
version BIGINT NOT NULL,
@@ -32,8 +26,8 @@ ALTER TABLE alf_access_control_list
ADD COLUMN acl_change_set BIGINT,
ADD COLUMN inherits_from BIGINT;
CREATE INDEX fk_alf_acl_acs ON alf_access_control_list (acl_change_set);
CREATE INDEX idx_pm_acl_inh ON alf_access_control_list (inherits, inherits_from);
ALTER TABLE alf_access_control_list ADD CONSTRAINT fk_alf_acl_acs FOREIGN KEY (acl_change_set) REFERENCES alf_acl_change_set (id);
CREATE INDEX idx_alf_acl_inh ON alf_access_control_list (inherits, inherits_from);
UPDATE alf_access_control_list acl
set acl_id = (acl.id);
@@ -69,7 +63,7 @@ ALTER TABLE alf_access_control_entry
DROP TABLE alf_auth_ext_keys;
-- remove authority constraint
ALTER TABLE alf_access_control_entry DROP INDEX FKFFF41F99B25A50BF, DROP FOREIGN KEY FKFFF41F99B25A50BF;
ALTER TABLE alf_access_control_entry DROP INDEX FKFFF41F99B25A50BF, DROP FOREIGN KEY FKFFF41F99B25A50BF; -- (optional)
-- restructure authority
ALTER TABLE alf_authority
@@ -79,7 +73,7 @@ ALTER TABLE alf_authority
CHANGE recipient authority VARCHAR(100),
ADD primary key (id),
ADD UNIQUE (authority, crc);
CREATE INDEX idx_authority on alf_authority (authority);
CREATE INDEX idx_alf_auth_aut on alf_authority (authority);
-- migrate data - fix up FK refs to authority
UPDATE alf_access_control_entry ace

View File

@@ -15,6 +15,8 @@ ALTER TABLE alf_access_control_entry DROP INDEX fk_alf_ace_auth, DROP FOREIGN KE
ALTER TABLE alf_access_control_list DROP INDEX fk_alf_acl_acs, DROP FOREIGN KEY fk_alf_acl_acs;
ALTER TABLE alf_access_control_list DROP INDEX idx_alf_acl_inh;
ALTER TABLE alf_acl_member DROP INDEX fk_alf_aclm_acl, DROP FOREIGN KEY fk_alf_aclm_acl;
ALTER TABLE alf_acl_member DROP INDEX fk_alf_aclm_ace, DROP FOREIGN KEY fk_alf_aclm_ace;
@@ -57,6 +59,12 @@ ALTER TABLE alf_audit_source DROP INDEX app_source_ser_idx; -- (optional)
ALTER TABLE alf_audit_source DROP INDEX app_source_met_idx; -- (optional)
ALTER TABLE alf_authority DROP INDEX idx_alf_auth_aut;
ALTER TABLE alf_authority_alias DROP INDEX fk_alf_autha_ali, DROP FOREIGN KEY fk_alf_autha_ali;
ALTER TABLE alf_authority_alias DROP INDEX fk_alf_autha_aut, DROP FOREIGN KEY fk_alf_autha_aut;
ALTER TABLE alf_child_assoc DROP INDEX FKFFC5468E8E50E582, DROP FOREIGN KEY FKFFC5468E8E50E582;
ALTER TABLE alf_child_assoc DROP INDEX FKFFC5468E74173FF4, DROP FOREIGN KEY FKFFC5468E74173FF4;
@@ -108,6 +116,8 @@ ALTER TABLE avm_history_links DROP INDEX fk_avm_hl_desc, DROP FOREIGN KEY fk_avm
ALTER TABLE avm_history_links DROP INDEX fk_avm_hl_ancestor, DROP FOREIGN KEY fk_avm_hl_ancestor; --(optional)
ALTER TABLE avm_history_links DROP INDEX idx_avm_hl_revpk; --(optional)
ALTER TABLE avm_merge_links DROP INDEX fk_avm_ml_to, DROP FOREIGN KEY fk_avm_ml_to; --(optional)
ALTER TABLE avm_merge_links DROP INDEX fk_avm_ml_from, DROP FOREIGN KEY fk_avm_ml_from; --(optional)
@@ -122,6 +132,8 @@ ALTER TABLE avm_nodes DROP INDEX fk_avm_n_acl, DROP FOREIGN KEY fk_avm_n_acl; --
ALTER TABLE avm_nodes DROP INDEX fk_avm_n_store, DROP FOREIGN KEY fk_avm_n_store; --(optional)
ALTER TABLE avm_nodes DROP INDEX idx_avm_n_pi; --(optional)
ALTER TABLE avm_store_properties DROP INDEX idx_avm_sp_name; --(optional)
ALTER TABLE avm_store_properties DROP INDEX fk_avm_sp_store, DROP FOREIGN KEY fk_avm_sp_store; --(optional)
@@ -132,6 +144,8 @@ ALTER TABLE avm_version_layered_node_entry DROP INDEX FK182E672DEB9D70C, DROP FO
ALTER TABLE avm_version_roots DROP INDEX idx_avm_vr_version; --(optional)
ALTER TABLE avm_version_roots DROP INDEX idx_avm_vr_revuq; --(optional)
ALTER TABLE avm_version_roots DROP INDEX fk_avm_vr_root, DROP FOREIGN KEY fk_avm_vr_root; --(optional)
ALTER TABLE avm_version_roots DROP INDEX fk_avm_vr_store, DROP FOREIGN KEY fk_avm_vr_store; --(optional)

View File

@@ -109,6 +109,10 @@ INSERT INTO t_qnames (qname)
(
SELECT DISTINCT type_qname FROM alf_child_assoc
);
INSERT INTO t_qnames (qname)
(
SELECT DISTINCT type_qname FROM alf_permission
);
-- Extract the namespace and localnames from the QNames
UPDATE t_qnames SET namespace = SUBSTR(SUBSTRING_INDEX(qname, '}', 1), 2);
UPDATE t_qnames SET localname = SUBSTRING_INDEX(qname, '}', -1);
@@ -316,6 +320,20 @@ UPDATE alf_node_assoc na set na.type_qname_id =
ALTER TABLE alf_node_assoc DROP COLUMN type_qname;
ALTER TABLE alf_node_assoc MODIFY COLUMN type_qname_id BIGINT NOT NULL AFTER target_node_id;
--
-- DATA REPLACEMENT: alf_permission.type_qname
--
ALTER TABLE alf_permission ADD COLUMN type_qname_id BIGINT NULL AFTER id;
UPDATE alf_permission p set p.type_qname_id =
(
SELECT q.id
FROM alf_qname q
JOIN alf_namespace ns ON (q.ns_id = ns.id)
WHERE CONCAT('{', ns.uri, '}', q.local_name) = p.type_qname
);
ALTER TABLE alf_permission DROP COLUMN type_qname;
ALTER TABLE alf_permission MODIFY COLUMN type_qname_id BIGINT NOT NULL AFTER id;
-- Drop the temporary indexes and constraints
ALTER TABLE alf_qname DROP INDEX t_fk_alf_qn_ns;
ALTER TABLE alf_qname DROP FOREIGN KEY t_fk_alf_qn_ns;

View File

@@ -41,6 +41,9 @@ CREATE INDEX idx_alf_ca_qn_ln ON alf_child_assoc (qname_localname);
CREATE INDEX idx_alf_txn_ctms ON alf_transaction (commit_time_ms);
-- The was 'idx_avm_lyr_indn'. Rename it if you have the old name.
CREATE INDEX idx_avm_n_pi on avm_nodes (primary_indirection);
CREATE INDEX idx_avm_np_name ON avm_node_properties (qname);
CREATE INDEX idx_avm_vr_version ON avm_version_roots (version_id);
@@ -49,6 +52,8 @@ CREATE INDEX idx_avm_vr_version ON avm_version_roots (version_id);
-- Explicit indexes and constraints not declared in the mappings
--
CREATE INDEX idx_alf_acl_inh ON alf_access_control_list (inherits, inherits_from);
CREATE INDEX fk_alf_na_qn ON alf_node_aspects (qname_id);
ALTER TABLE alf_node_aspects ADD CONSTRAINT fk_alf_na_qn FOREIGN KEY (qname_id) REFERENCES alf_qname (id);

View File

@@ -15,6 +15,15 @@
<property name="jaasConfigEntryName">
<value>Alfresco</value>
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="personService">
<ref bean="personService" />
</property>
<property name="transactionService">
<ref bean="transactionService" />
</property>
</bean>
<!-- DAO that rejects changes - JAAS is read only at the moment. -->

View File

@@ -53,6 +53,15 @@
-->
<value>${ldap.authentication.userNameFormat}</value>
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="personService">
<ref bean="personService" />
</property>
<property name="transactionService">
<ref bean="transactionService" />
</property>
</bean>
<!--

View File

@@ -259,6 +259,9 @@
<bean id="aclDaoComponent" class="org.alfresco.repo.domain.hibernate.AclDaoComponentImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
<property name="qnameDAO">
<ref bean="qnameDAO" />
</property>
<property name="aclCache">
<ref bean="aclCache" />

View File

@@ -169,6 +169,9 @@
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
<property name="qnameDAO">
<ref bean="qnameDAO" />
</property>
</bean>
<bean id="patch.guestUser" class="org.alfresco.repo.admin.patch.impl.GuestUserPatch" parent="basePatch" >
<property name="id"><value>patch.guestUser</value></property>
@@ -211,6 +214,9 @@
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
<property name="qnameDAO">
<ref bean="qnameDAO" />
</property>
<property name="dependsOn">
<list>
<ref bean="patch.guestUser"/>
@@ -279,6 +285,9 @@
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
<property name="qnameDAO">
<ref bean="qnameDAO" />
</property>
<property name="dependsOn">
<list>
<ref bean="patch.updateGuestPermission" />
@@ -1240,6 +1249,9 @@
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
<property name="qnameDAO">
<ref bean="qnameDAO" />
</property>
<property name="dependsOn" >
<list>
<ref bean="patch.db-V2.2-ACL" />