-
Oct 11th, 2008, 12:09 PM
#1
How to use TransactionProxyFactoryBean in JavaConfig?
Thanks!
I'm new to JavaConfig and have one question. In our development we use spring's transaction management because it's so powerful and convenient, thanks to the AOP! ^_^ Usually we'll define one base bean like this:
<bean id="baseProxy" lazy-init="true" abstract="true" class="org.springframework.transaction.interceptor .TransactionProxyFactoryBean">
<property name="transactionAttributes">
<props>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
then we can define our transactional service as :
<bean id="fooService" parent="baseProxy">
<property name="target">
<bean class="example.FooServiceImpo">
<property name="fooDao"><ref bean="fooDao"/></property>
</bean>
</property>
</bean>
now our "fooService" can use the above transaction attribute defined in its parent bean, but how to implement this configuration when we are using JavaConfig? I didn't find any hint in JavaConfig's reference document.
Thanks again!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules