You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/03/12 02:58:20 UTC
[GitHub] [incubator-shardingsphere] xfyang1989 edited a comment on issue
#2012: Using @ShardingTransactionType(TransactionType.XA) does not work
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:
users@infra.apache.org
With regards,
Apache Git Services