liuyangming commented on issue #2854: modify the enlistment to support the 
transaction propagation REQUIRES_NEW
URL: 
https://github.com/apache/incubator-shardingsphere/pull/2854#issuecomment-521117569
 
 
   > thanks for your reply, it looks like you have a great experiment about 
usaging XA.
   > in fact our sharding-transaction-xa integrated with ShardingConnection, 
you should try to make ShardingConnection support nested transaction at first. 
see `ShardingConnection#setAutoCommit`
   
   In my understanding, although the commit/rollback of the RMLT(resource 
manager local transaction) depends on java.sql.Connection to complete, the XA 
transaction is completely independent of the java.sql.Connection. It may be not 
appropriate to control the XA transaction through the java.sql.Connection, i 
think the TM is more suitable. 
   
   Furthermore, this scenario involves two different xa transactions, they get 
two different Connections, except share the same thread context, there is no 
association between them. To support the REQUIRES_NEW transaction propagation, 
simply forwarding the enlistResource operation to the TM is sufficient.

----------------------------------------------------------------
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