Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

59855: Merged V4.2-BUG-FIX (4.2.2) to HEAD-BUG-FIX (Cloud/4.3)
      59601: Merged DEV to V4.2-BUG-FIX
         58003: Prevent QNameDAO from being used without a txn (MNT-9806)
         58022: Fix bootstrap sequencing issues related to Content Publishing and Site models
                - I thought I had broken something but it's one of those random bean loading issues that we don't commonly see
                - Pulled models into core model lists so that we know and understand the ordering of the model loading
                - Removed QNameDAO transaction check, just in case (will reapply it with subsequent commit)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62193 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-12 08:07:52 +00:00
parent 79ccf18f85
commit 4119889331
6 changed files with 37 additions and 22 deletions

View File

@@ -2,13 +2,6 @@
<!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>
<bean id="publishingService_dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/model/publishingModel.xml</value>
</list>
</property>
</bean>
<!-- Bootstrap the publishing process definition --> <!-- Bootstrap the publishing process definition -->
<bean parent="workflowDeployer"> <bean parent="workflowDeployer">

View File

@@ -821,6 +821,12 @@
<!-- Share UI model --> <!-- Share UI model -->
<value>alfresco/model/shareUiModel.xml</value> <value>alfresco/model/shareUiModel.xml</value>
<!-- Site model -->
<value>alfresco/model/siteModel.xml</value>
<!-- Content Publishing model -->
<value>alfresco/model/publishingModel.xml</value>
</list> </list>
</property> </property>
<property name="labels"> <property name="labels">
@@ -836,6 +842,7 @@
<value>alfresco/messages/transfer-model</value> <value>alfresco/messages/transfer-model</value>
<value>alfresco/messages/wcmapp-model</value> <value>alfresco/messages/wcmapp-model</value>
<value>alfresco/messages/publishing-model</value> <value>alfresco/messages/publishing-model</value>
<value>alfresco/messages/site-model</value>
</list> </list>
</property> </property>
</bean> </bean>

View File

@@ -81,7 +81,21 @@
<property name="sqlSessionTemplate" ref="repoSqlSessionTemplate"/> <property name="sqlSessionTemplate" ref="repoSqlSessionTemplate"/>
</bean> </bean>
<bean id="qnameDAO" class="org.alfresco.repo.domain.qname.ibatis.QNameDAOImpl"> <bean id="qnameDAO" class="org.springframework.aop.framework.ProxyFactoryBean" >
<property name="targetName">
<value>qnameDAOImpl</value>
</property>
<property name="proxyInterfaces">
<list>
<value>org.alfresco.repo.domain.qname.QNameDAO</value>
</list>
</property>
<property name="interceptorNames">
<list>
</list>
</property>
</bean>
<bean id="qnameDAOImpl" class="org.alfresco.repo.domain.qname.ibatis.QNameDAOImpl">
<property name="sqlSessionTemplate" ref="repoSqlSessionTemplate"/> <property name="sqlSessionTemplate" ref="repoSqlSessionTemplate"/>
<property name="namespaceCache" ref="immutableEntityCache"/> <property name="namespaceCache" ref="immutableEntityCache"/>
<property name="qnameCache" ref="immutableEntityCache"/> <property name="qnameCache" ref="immutableEntityCache"/>

View File

@@ -3,20 +3,6 @@
<beans> <beans>
<bean id="siteService_dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/model/siteModel.xml</value>
</list>
</property>
<property name="labels">
<list>
<!-- i18n strings for Site Service Model-->
<value>alfresco/messages/site-model</value>
</list>
</property>
</bean>
<!-- Bootstrap the permission model --> <!-- Bootstrap the permission model -->
<bean id="siteService_permissionBootstrap" parent="permissionModelBootstrap"> <bean id="siteService_permissionBootstrap" parent="permissionModelBootstrap">
<property name="model" value="alfresco/model/sitePermissionDefinitions.xml"/> <property name="model" value="alfresco/model/sitePermissionDefinitions.xml"/>

View File

@@ -1094,6 +1094,8 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
setComplete(); setComplete();
endTransaction(); endTransaction();
startNewTransaction();
assertFalse("n6 not directly deleted", nodeService.exists(n6Ref)); assertFalse("n6 not directly deleted", nodeService.exists(n6Ref));
assertFalse("n8 not cascade deleted", nodeService.exists(n8Ref)); assertFalse("n8 not cascade deleted", nodeService.exists(n8Ref));
assertEquals("n6 primary parent association not removed from n3", 0, countChildrenOfNode(n3Ref)); assertEquals("n6 primary parent association not removed from n3", 0, countChildrenOfNode(n3Ref));
@@ -1845,6 +1847,8 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
setComplete(); setComplete();
endTransaction(); endTransaction();
startNewTransaction();
// get the properties back // get the properties back
Map<QName, Serializable> checkProperties = nodeService.getProperties(nodeRef); Map<QName, Serializable> checkProperties = nodeService.getProperties(nodeRef);
checkProperty = checkProperties.get(PROP_QNAME_ENCRYPTED_VALUE); checkProperty = checkProperties.get(PROP_QNAME_ENCRYPTED_VALUE);

View File

@@ -80,6 +80,17 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
dictionaryService = (DictionaryService) applicationContext.getBean("dictionaryService"); dictionaryService = (DictionaryService) applicationContext.getBean("dictionaryService");
} }
/**
* Ensure that transactionless calls are handled
*/
public void testCallWithoutTxn()
{
setComplete();
endTransaction();
nodeService.getAllRootNodes(rootNodeRef.getStoreRef());
}
/** /**
* Manually trigger the cleanup registry * Manually trigger the cleanup registry
*/ */