Removed RetryingTransactionHelper and friends. AVMService's transactional

behavior is now declaratively specified.  


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3662 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-09-03 06:30:05 +00:00
parent 7c70be1811
commit 0b58cca272
10 changed files with 181 additions and 1000 deletions

View File

@@ -7,22 +7,22 @@
<!-- ID Issuers. -->
<bean id="nodeIssuer" class="org.alfresco.repo.avm.Issuer"
depends-on="retryingTransaction,avmContext" init-method="init">
depends-on="avmContext" init-method="init">
<property name="name">
<value>node</value>
</property>
<property name="retryingTransaction">
<ref bean="retryingTransaction"/>
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
</bean>
<bean id="layerIssuer" class="org.alfresco.repo.avm.Issuer"
depends-on="retryingTransaction,avmContext" init-method="init">
depends-on="avmContext" init-method="init">
<property name="name">
<value>layer</value>
</property>
<property name="retryingTransaction">
<ref bean="retryingTransaction"/>
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
</bean>
@@ -141,45 +141,6 @@
</property>
</bean>
<!-- A read only DefaultTransactionDefinition -->
<bean id="readTransactionDefinition"
class="org.springframework.transaction.support.DefaultTransactionDefinition">
<property name="propagationBehaviorName">
<value>PROPAGATION_REQUIRED</value>
</property>
<property name="readOnly">
<value>true</value>
</property>
</bean>
<!-- A write DefaultTransactionDefinition -->
<bean id="writeTransactionDefinition"
class="org.springframework.transaction.support.DefaultTransactionDefinition">
<property name="propagationBehaviorName">
<value>PROPAGATION_REQUIRED</value>
</property>
<property name="readOnly">
<value>false</value>
</property>
</bean>
<!-- The Retrying Transaction Helper. -->
<bean id="retryingTransaction"
class="org.alfresco.repo.avm.hibernate.HibernateRetryingTransactionHelper">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="readTransactionDefinition">
<ref bean="readTransactionDefinition"/>
</property>
<property name="writeTransactionDefinition">
<ref bean="writeTransactionDefinition"/>
</property>
</bean>
<bean id="orphanReaper" class="org.alfresco.repo.avm.OrphanReaper"
init-method="init" destroy-method="shutDown" depends-on="AVMService">
<property name="inactiveBaseSleep">
@@ -194,8 +155,8 @@
<property name="maxQueueLength">
<value>1000</value>
</property>
<property name="retryingTransaction">
<ref bean="retryingTransaction"/>
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
</bean>

View File

@@ -1007,9 +1007,6 @@
<!-- The AVMService -->
<bean id="avmService" class="org.alfresco.repo.avm.AVMServiceImpl">
<property name="retryingTransaction">
<ref bean="retryingTransaction"/>
</property>
<property name="avmRepository">
<ref bean="avmRepository"/>
</property>
@@ -1024,6 +1021,7 @@
</property>
<property name="interceptorNames">
<list>
<idref local="AVMService_transaction"/>
<idref local="AVMService_descriptor"/>
</list>
</property>
@@ -1038,6 +1036,22 @@
</property>
</bean>
<bean id="AVMService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="hasAspect">${server.transaction.mode.readOnly}</prop>
<prop key="getContentDataForWrite">${server.transaction.mode.default}</prop>
<prop key="getFileOutputStream">${server.transaction.mode.default}</prop>
<prop key="get*">${server.transaction.mode.readOnly}</prop>
<prop key="lookup">${server.transaction.mode.readOnly}</prop>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<!-- Workflow Service -->
<bean id="WorkflowService" class="org.springframework.aop.framework.ProxyFactoryBean">