<!-- base Interceptor with most of configuration for transaction -->
<bean id="abstractTransactionInterceptor" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" lazy-init="true" abstract="true">
<property name="transactionManager"><ref bean="slapdTransactionManager"/></property>
<property name="optimize"><value>true</value></property>
<property name="transactionAttributes">
<props>
<prop key="persist*">PROPAGATION_REQUIRED, -Exception</prop>
<prop key="find*">readOnly</prop>
<prop key="get*">readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED, -Exception</prop>
</props>
</property>
</bean>
<bean id="realBean" class="com.xxx.xxxx">
<property name="xxx"><ref bean="xxx"/></property>
</bean>
<bean id="proxyBean" parent="abstractTransactionInterceptor">
<property name="target"><ref bean="realBean"/></property>
</bean>
<bean id="abstractTransactionInterceptor" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" lazy-init="true" abstract="true">
<property name="transactionManager"><ref bean="slapdTransactionManager"/></property>
<property name="optimize"><value>true</value></property>
<property name="transactionAttributes">
<props>
<prop key="persist*">PROPAGATION_REQUIRED, -Exception</prop>
<prop key="find*">readOnly</prop>
<prop key="get*">readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED, -Exception</prop>
</props>
</property>
</bean>
<bean id="realBean" class="com.xxx.xxxx">
<property name="xxx"><ref bean="xxx"/></property>
</bean>
<bean id="proxyBean" parent="abstractTransactionInterceptor">
<property name="target"><ref bean="realBean"/></property>
</bean>
Comments
Post a Comment