xfyang1989 edited a comment on issue #2012: Using 
@ShardingTransactionType(TransactionType.XA) does not work
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2012#issuecomment-471833118
 
 
   this is my configure:
    <sharding:data-source id="shardingDataSource">
           <sharding:sharding-rule data-source-names="rw0,rw1" 
default-data-source-name="rw0">
               <sharding:table-rules>
                   <sharding:table-rule logic-table="ic_sku_channel_inventory" 
actual-data-nodes="rw$->{0..1}.ic_sku_channel_inventory_$->{0..15}" 
                        database-strategy-ref="databaseShardingStrategy" 
table-strategy-ref="tableShardingStrategy"/>
               </sharding:table-rules>
           </sharding:sharding-rule>
          <sharding:props>
               <!-- 打印sharding执行的sql语句,可查看逻辑表和真实表执行情况;还需配置pom.xml并添加logback.xml 
-->
               <prop key="sql.show">true</prop>
           </sharding:props>
       </sharding:data-source>
   
    <import resource="classpath:META-INF/shardingTransaction.xml"/>
   
   @ShardingTransactionType(TransactionType.XA)
   @Transactional
   public void freezeInventory(SKUBizInvFreezeSo bizInvFreezeSo){}
   
   My MySQL driver : mysql-connector-java-5.1.45.jar

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to