bobbyz007 opened a new issue, #6563: URL: https://github.com/apache/incubator-seata/issues/6563
<!-- Please do not use this issue template to report security vulnerabilities but refer to our [security policy](https://github.com/seata/seata/security/policy). --> - [ ] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate. ### Ⅰ. Issue Description saga模式下加载DefaultResourceManager的initResourceManagers()方法中,EnhancedServiceLoader会默认以兼容模式同时加载org.apache和io.seata下的SataResourceManager, 也就是SAGA指向两个Manager,但添加到resourceManagers中被覆盖了只添加io.seata下的对象,导致org.apache和io.seata混乱。 ``` protected void initResourceManagers() { //init all resource managers List<ResourceManager> allResourceManagers = EnhancedServiceLoader.loadAll(ResourceManager.class); if (CollectionUtils.isNotEmpty(allResourceManagers)) { for (ResourceManager rm : allResourceManagers) { resourceManagers.put(rm.getBranchType(), rm); } } } ``` ### Ⅲ. Describe what you expected to happen 当前代码兼容模式默认都是true,或者由用户指定,如果用户都是使用org.apache包,则compatible兼容设置为false,避免在使用org.apache下的包还会引用到io.seata下的对象 -- 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]
