You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/04/20 03:43:35 UTC

[GitHub] [dubbo] 12482 commented on issue #9913: RMI协议同一个服务提供者中,分组和版本不起作用

12482 commented on issue #9913:
URL: https://github.com/apache/dubbo/issues/9913#issuecomment-1103439669

   > 我看了相关代码,存在你说的版本、分组无效问题。
   > 
   > 原因在于RMI 绑定到Registry注册表时name(远程引用对象关联的名称)不能重复,如果重复会报AlreadyBoundException异常。dubbo-rpc-rmi模块中用的RmiServiceExporter对象完成绑定操作,其replaceExistingBinding属性默认为true,所以会调用rebind方法进行重绑定,name相同会覆盖。
   > 
   > 目前dubbo中绑定的name值是接口全限定名,未包含分组和版本标识。 例如:rebind(org.apache.dubbo.demo.DemoService, obj); 如果加上分组和版本值:rebind(g1/org.apache.dubbo.demo.DemoService:v1,obj),则name唯一,Consumer远程调用时会找到指定的存根对象进行调用。
   > 
   > 本地已测可行。我在RmiProtocol类中调整了doRefer()、createExporter()代码后,版本和分组已生效。
   > 
   > 但我切换3.0.7分支后,发现dubbo-rpc-rmi相关模块已移除。所以我不清楚这是不是bug。
   
   调整doRefer()、createExporter()我在本地也尝试过,基本功能没问题,但是不确定是否会带来其他影响,dubbo2.7 是否还会有相关的补丁发布呢,dubbo3的rmi协议应该是要重新适配 https://github.com/apache/dubbo/issues/7781,


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org