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/03/11 02:51:03 UTC

[GitHub] [dubbo] xjjva520 opened a new issue #9766: Dubbo3.0.6版本 ExtensionLoader loadDirectory()为啥要重复loadDirectory?

xjjva520 opened a new issue #9766:
URL: https://github.com/apache/dubbo/issues/9766


       private void loadDirectory(Map<String, Class<?>> extensionClasses, LoadingStrategy strategy, String type) {
           loadDirectory(extensionClasses, strategy.directory(), type, strategy.preferExtensionClassLoader(),
               strategy.overridden(), strategy.includedPackages(), strategy.excludedPackages(), strategy.onlyExtensionClassLoaderPackages());
           //以前的路径用从com
           String oldType = type.replace("org.apache", "com.alibaba");
   
           loadDirectory(extensionClasses, strategy.directory(), oldType, strategy.preferExtensionClassLoader(),
               strategy.overridden(), strategy.includedPackagesInCompatibleType(), strategy.excludedPackages(), strategy.onlyExtensionClassLoaderPackages());
       }
   上述代码oldType 和type一致的情况下,loadDirectory会执行两遍,且没有任何意义,为啥要这样做?


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


[GitHub] [dubbo] chickenlj commented on issue #9766: Dubbo3.0.6版本 SPI机制源码: ExtensionLoader loadDirectory()为啥要重复loadDirectory?

Posted by GitBox <gi...@apache.org>.
chickenlj commented on issue #9766:
URL: https://github.com/apache/dubbo/issues/9766#issuecomment-1080395477


   自定义扩展点报名也会遵循


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


[GitHub] [dubbo] xjjva520 commented on issue #9766: Dubbo3.0.6版本 SPI机制源码: ExtensionLoader loadDirectory()为啥要重复loadDirectory?

Posted by GitBox <gi...@apache.org>.
xjjva520 commented on issue #9766:
URL: https://github.com/apache/dubbo/issues/9766#issuecomment-1067672850


   自定义的SPI扩展点应该就会这样吧


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


[GitHub] [dubbo] xjjva520 removed a comment on issue #9766: Dubbo3.0.6版本 SPI机制源码: ExtensionLoader loadDirectory()为啥要重复loadDirectory?

Posted by GitBox <gi...@apache.org>.
xjjva520 removed a comment on issue #9766:
URL: https://github.com/apache/dubbo/issues/9766#issuecomment-1067672850


   自定义的SPI扩展点应该就会这样吧


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


[GitHub] [dubbo] AlbumenJ commented on issue #9766: Dubbo3.0.6版本 SPI机制源码: ExtensionLoader loadDirectory()为啥要重复loadDirectory?

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #9766:
URL: https://github.com/apache/dubbo/issues/9766#issuecomment-1067660411


   type 对应的是 SPI 扩展点,目前全部都是 org.apache.dubbo 的包名的,所以不会有重复加载。


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


[GitHub] [dubbo] xjjva520 commented on issue #9766: Dubbo3.0.6版本 SPI机制源码: ExtensionLoader loadDirectory()为啥要重复loadDirectory?

Posted by GitBox <gi...@apache.org>.
xjjva520 commented on issue #9766:
URL: https://github.com/apache/dubbo/issues/9766#issuecomment-1067672224


   自定义的SPI扩展点应该就会这样吧


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


[GitHub] [dubbo] chickenlj closed issue #9766: Dubbo3.0.6版本 SPI机制源码: ExtensionLoader loadDirectory()为啥要重复loadDirectory?

Posted by GitBox <gi...@apache.org>.
chickenlj closed issue #9766:
URL: https://github.com/apache/dubbo/issues/9766


   


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