You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/20 06:58:33 UTC

[GitHub] [shardingsphere] shenHaoRanDe opened a new issue #7859: SpringAOP global distributed transaction configuration

shenHaoRanDe opened a new issue #7859:
URL: https://github.com/apache/shardingsphere/issues/7859


   <!--Perform related configuration of ShardingDataSource-->
   ....
   <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
       <property name="dataSource" ref="shardingDataSource"/>
   </bean>
   
   <!-- Configure transaction characteristics -->
   <tx:advice id="txAdvice" transaction-manager="transactionManager">
       <tx:attributes>
           <tx:method name="save*" propagation="REQUIRED" />
           <tx:method name="add*" propagation="REQUIRED"/>
           <tx:method name="delete*" propagation="REQUIRED"/>
           <tx:method name="update*" propagation="REQUIRED"/>
           <tx:method name="insert*" propagation="REQUIRED"/>
           <tx:method name="create*" propagation="REQUIRED"/>
           <tx:method name="deal*" propagation="REQUIRED"/>
           <tx:method name="do*" propagation="REQUIRED"/>
           <tx:method name="set*" propagation="REQUIRED"/>
           <tx:method name="change*" propagation="REQUIRED"/>
           <tx:method name="*" read-only="true"/>
       </tx:attributes>
   </tx:advice>
   
   <!-- Configure transaction entry points and areas -->
   <aop:config>
       <aop:pointcut id="allServiceMethod" expression="execution(* com.shen.service..*.*(..))"/>
       <aop:advisor advice-ref="txAdvice" pointcut-ref="allServiceMethod"/>
   </aop:config>
   **This kind of global transaction configuration, how to integrate sharding-jdbc distributed transaction, is there an example?**


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] shenHaoRanDe commented on issue #7859: SpringAOP global distributed transaction configuration

Posted by GitBox <gi...@apache.org>.
shenHaoRanDe commented on issue #7859:
URL: https://github.com/apache/shardingsphere/issues/7859#issuecomment-712667615


   @yu199195 Is there any other configuration method besides adding annotations to the method?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] shenHaoRanDe commented on issue #7859: SpringAOP global distributed transaction configuration

Posted by GitBox <gi...@apache.org>.
shenHaoRanDe commented on issue #7859:
URL: https://github.com/apache/shardingsphere/issues/7859#issuecomment-712656147


   @yu199195 I have seen this, there is no configuration for global transactions, only one type of configuration is annotation


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] yu199195 commented on issue #7859: SpringAOP global distributed transaction configuration

Posted by GitBox <gi...@apache.org>.
yu199195 commented on issue #7859:
URL: https://github.com/apache/shardingsphere/issues/7859#issuecomment-712653258


   @shenHaoRanDe  you can follow this : https://shardingsphere.apache.org/document/legacy/4.x/document/cn/manual/sharding-jdbc/usage/transaction/


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org