mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added RetryingTransactionAdvice and wired it up for AVMService. The tests pass
and the app still works. Added new convenience target to common.xml, run-junit. It syntactically like run-test but doesn't use the junit ant task, which has the unfortunate characteristic of buffering stdout and stderr in memory. This may be fine in many cases but wreaks havoc with memory use if you're test spews lots of diagnostics. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4577 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -158,6 +158,48 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="readWriteTransactionDefinition" class="org.springframework.transaction.support.DefaultTransactionDefinition">
|
||||
<property name="propagationBehaviorName">
|
||||
<value>PROPAGATION_REQUIRED</value>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<value>false</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="readOnlyTransactionDefinition" class="org.springframework.transaction.support.DefaultTransactionDefinition">
|
||||
<property name="propagationBehaviorName">
|
||||
<value>PROPAGATION_REQUIRED</value>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<value>true</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="retryingWriteTxnAdvice" class="org.alfresco.repo.transaction.RetryingTransactionAdvice">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
<property name="transactionDefinition">
|
||||
<ref bean="readWriteTransactionDefinition"/>
|
||||
</property>
|
||||
<property name="maxRetries">
|
||||
<value>10</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="retryingReadTxnAdvice" class="org.alfresco.repo.transaction.RetryingTransactionAdvice">
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager"/>
|
||||
</property>
|
||||
<property name="transactionDefinition">
|
||||
<ref bean="readOnlyTransactionDefinition"/>
|
||||
</property>
|
||||
<property name="maxRetries">
|
||||
<value>10</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- -->
|
||||
<!-- I18N -->
|
||||
<!-- -->
|
||||
|
@@ -1023,6 +1023,106 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="avmServiceReadTxnAdvisor" class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
||||
<property name="advice">
|
||||
<ref bean="retryingReadTxnAdvice"/>
|
||||
</property>
|
||||
<property name="mappedNames">
|
||||
<list>
|
||||
<value>getFileInputStream</value>
|
||||
<value>getContentReader</value>
|
||||
<value>getDirectoryListing</value>
|
||||
<value>getDirectoryListingDirect</value>
|
||||
<value>getDirectoryListingArray</value>
|
||||
<value>getDeleted</value>
|
||||
<value>getNextVersionID</value>
|
||||
<value>getLatestSnapshotID</value>
|
||||
<value>getAVMStoreVersions</value>
|
||||
<value>getAVMStores</value>
|
||||
<value>getAVMStoreRoot</value>
|
||||
<value>lookup</value>
|
||||
<value>getPaths</value>
|
||||
<value>getHeadPaths</value>
|
||||
<value>getPathsInStoreHead</value>
|
||||
<value>getIndirectionPath</value>
|
||||
<value>getHistory</value>
|
||||
<value>getCommonAncestor</value>
|
||||
<value>getLayereingInfo</value>
|
||||
<value>getNodeProperty</value>
|
||||
<value>getNodeProperties</value>
|
||||
<value>getStoreProperty</value>
|
||||
<value>getStoreProperties</value>
|
||||
<value>queryStorePropertyKey</value>
|
||||
<value>queryStoresPropertyKeys</value>
|
||||
<value>getContentDataForRead</value>
|
||||
<value>getAspects</value>
|
||||
<value>hasAspect</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="avmServiceWriteTxnAdvisor" class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
||||
<property name="advice">
|
||||
<ref bean="retryingWriteTxnAdvice"/>
|
||||
</property>
|
||||
<property name="mappedNames">
|
||||
<list>
|
||||
<value>getFileOutputStream</value>
|
||||
<value>createContentWriter</value>
|
||||
<value>createFile</value>
|
||||
<value>createDirectory</value>
|
||||
<value>createLayeredFile</value>
|
||||
<value>createLayeredDirectory</value>
|
||||
<value>retargetLayeredDirectory</value>
|
||||
<value>createAVMStore</value>
|
||||
<value>createBranch</value>
|
||||
<value>removeNode</value>
|
||||
<value>rename</value>
|
||||
<value>uncover</value>
|
||||
<value>flatten</value>
|
||||
<value>createSnapshot</value>
|
||||
<value>purgeAVMStore</value>
|
||||
<value>purgeVersion</value>
|
||||
<value>makePrimary</value>
|
||||
<value>setOpacity</value>
|
||||
<value>setNodeProperty</value>
|
||||
<value>setNodeProperties</value>
|
||||
<value>deleteNodeProperty</value>
|
||||
<value>deleteNodeProperties</value>
|
||||
<value>setStoreProperty</value>
|
||||
<value>setStoreProperties</value>
|
||||
<value>deleteStoreProperty</value>
|
||||
<value>getContentDataForWrite</value>
|
||||
<value>setContentData</value>
|
||||
<value>setMetaDataFrom</value>
|
||||
<value>addAspect</value>
|
||||
<value>removeAspect</value>
|
||||
<value>link</value>
|
||||
<value>forceCopy</value>
|
||||
<value>copy</value>
|
||||
<value>renameStore</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="AVMService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces">
|
||||
<list>
|
||||
<value>org.alfresco.service.cmr.avm.AVMService</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="targetName">
|
||||
<value>avmService</value>
|
||||
</property>
|
||||
<property name="interceptorNames">
|
||||
<list>
|
||||
<value>avmServiceWriteTxnAdvisor</value>
|
||||
<value>avmServiceReadTxnAdvisor</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
<bean id="AVMService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces">
|
||||
<value>org.alfresco.service.cmr.avm.AVMService</value>
|
||||
@@ -1037,6 +1137,7 @@
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
<bean id="AVMService_descriptor" parent="AlfrescoServiceDescriptor">
|
||||
<property name="interface">
|
||||
|
Reference in New Issue
Block a user