aofall commented on issue #265: URL: https://github.com/apache/dubbo-spi-extensions/issues/265#issuecomment-2041419559
According to the [official seata documentation](https://seata.apache.org/zh-cn/docs/user/microservice#%E4%BA%8B%E5%8A%A1%E4%B8%8A%E4%B8%8B%E6%96%87), it is released after the RPC call is completed. I think is not a bug. Seata is prepared for **distributed transactions**, if you write business in singleton application, you don't need to use seata, or write related transaction logic in the same place, or maintain the xid yourself in the business logic like this. ``` class BusinessImpl { @GlobalTransactional public void business() { String xid = RootContext.getXID() // do dubbo injvm invoke business1 // rebind xid again RootContext.bind(xid); // do dubbo injvm invoke business2 } } ``` ``` class Business2Impl { @GlobalTransactional public void business2() { String xid = RootContext.getXID() // do business2 and rebind xid again RootContext.bind(xid); // do dubbo injvm invoke business3 } } ``` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
