Announcement Announcement Module
Collapse
No announcement yet.
TransactionProxyFactoryBean and throwsAdvice. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • TransactionProxyFactoryBean and throwsAdvice.

    I have the following config. dataSourceEvaluator implements ThrowsAdvice has some logic to perform when the transaction is rolledback, but seems like TransactionProxyFactoryBean does not support interceptorNames. Is there any other way to implement this.

    Code:
    <bean id="dataSourceEvaluator" class="com.att.scld.workq.util.DataSourceEvaluater" >
    		<property name="dataSourcePrim" ref="dataSource-SANDBOX-LAB-PRIM" /> 
    		<property name="dataSourceSec" ref="dataSource-SANDBOX-LAB-SEC" /> 
    </bean>
    
    <bean id="actionDAO-SANDBOX-LAB"
    		class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    		<property name="transactionManager" ref="transactionManager" />
    		<property name="target" ref="actionDAO-SANDBOX-LAB-Target" />
    		<property name="proxyTargetClass" value="true" />
    		<property name="transactionAttributes">
    			<props>
    				<prop key="*">PROPAGATION_REQUIRED,-Exception
    				</prop>
    				<prop key="getActions">PROPAGATION_SUPPORTS</prop>
    			</props>
    		</property>
    		<property name="interceptorNames">
    			<list>
    				<value>dataSourceEvaluator</value>
    			</list>
    		</property>		
    	</bean>

    thanks in advance.

  • #2
    Throws advise is invoked when exception is thrown by the method. The exception might also result in transaction rollback, if you have configured rollback for the exception. How are you configuring the throws advise?

    Comment

    Working...
    X