Organizational Research By

Surprising Reserch Topic

spring transaction manager and multithreading


spring transaction manager and multithreading  using -'java,spring,spring-transactions'

I am writing multithreading program in serviceImpl using Callable interface.I am using spring transaction manager.When update operation is executed in DB ,it is  executed successfully .But the updated data is not reflected in DB.But When i run program without multithreading it is updated in DB.

This is my configuration

<tx:advice id="txAdvice" transaction-manager="txManager">
        <tx:attributes>
            <tx:method name="*" />
            <tx:method name="find*" propagation="NOT_SUPPORTED" />
            <tx:method name="get*" propagation="NOT_SUPPORTED" />
        </tx:attributes>
    </tx:advice>
    <aop:config>
        <aop:pointcut id="serviceOperation" expression="execution(* *..*ServiceImpl.*(..))" />
        <aop:advisor advice-ref="txAdvice" pointcut-ref="serviceOperation" />
    </aop:config>
    <bean id="txManager"
        class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource" />
    </bean>


I can shift to another approach for transaction manager.Just i want to get confirm if this approach supports or not  for multithreading.
So my question is
Do spring transaction manager supports multithreading(I mean just by declaring annotation  Or XML )
Why updated  data is not reflected in DB in my case?
What can be the best alternative approach ?
    
asked Oct 7, 2015 by vickeykumar66
0 votes
12 views



Related Hot Questions



Government Jobs Opening


...