Results 1 to 2 of 2

Thread: TransactionProxyFactoryBean and throwsAdvice.

  1. #1
    Join Date
    Aug 2011
    Posts
    2

    Default 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. #2
    Join Date
    May 2011
    Location
    New Delhi, India
    Posts
    157

    Default

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •