| Sign In/My Account | View Cart |
| Article: |
An Introduction to Aspect-Oriented Programming with the Spring Framework, Part 1 | |
| Subject: | Injecting both Transactions & MethodAdvices | |
| Date: | 2007-01-04 14:46:19 | |
| From: | kcav8or | |
|
Response to: Injecting both Transactions & MethodAdvices
|
||
| Did you ever find a solution to this? I have the same requirement. | ||
Showing messages 1 through 2 of 2.
<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory"> <ref local="sessionFactory" /> </property>
</bean>
<bean id="loggingThrowsAdvice" class="com.myapp.aop.LoggingThrowsAdvice">
</bean>
<bean id="txProxyTemplate" abstract="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager" ref="transactionManager"/>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
<property name="preInterceptors">
<list>
<ref local="loggingThrowsAdvice" />
</list>
</property>
</bean>
<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory"> <ref local="sessionFactory" /> </property>
</bean>
<bean id="loggingThrowsAdvice" class="com.myapp.aop.LoggingThrowsAdvice">
</bean>
<bean id="txProxyTemplate" abstract="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager" ref="transactionManager"/>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
<property name="preInterceptors">
<list>
<ref local="loggingThrowsAdvice" />
</list>
</property>
</bean>