You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by al...@apache.org on 2023/12/14 11:41:26 UTC
(dubbo-samples) branch master updated: Remove 99-integration due to moving to https://github.com/apache/dubbo-integration-cases
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git
The following commit(s) were added to refs/heads/master by this push:
new 7da60fd6e Remove 99-integration due to moving to https://github.com/apache/dubbo-integration-cases
7da60fd6e is described below
commit 7da60fd6e40251ed080572777b19431fc483f631
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Thu Dec 14 19:41:06 2023 +0800
Remove 99-integration due to moving to https://github.com/apache/dubbo-integration-cases
---
.../case-configuration.yml | 69 ---
.../case-versions.conf | 25 -
.../dubbo-samples-empty-protection-nacos/pom.xml | 151 -----
.../main/java/org/apache/dubbo/samples/Main.java | 23 -
.../apache/dubbo/samples/api/GreetingsService.java | 23 -
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../src/main/resources/log4j2.xml | 29 -
.../org/apache/dubbo/samples/empty/DefaultIT.java | 74 ---
.../apache/dubbo/samples/empty/NoProtectIT.java | 70 ---
.../org/apache/dubbo/samples/empty/ProtectIT.java | 64 --
.../case-configuration.yml | 22 -
.../case-versions.conf | 25 -
.../dubbo-samples-empty-protection/pom.xml | 162 -----
.../apache/dubbo/samples/EmbeddedZooKeeper.java | 309 ----------
.../main/java/org/apache/dubbo/samples/Main.java | 23 -
.../apache/dubbo/samples/api/GreetingsService.java | 23 -
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../org/apache/dubbo/samples/empty/DefaultIT.java | 73 ---
.../apache/dubbo/samples/empty/NoProtectIT.java | 69 ---
.../org/apache/dubbo/samples/empty/ProtectIT.java | 63 --
99-integration/dubbo-samples-hibernate/README.md | 8 -
.../dubbo-samples-hibernate/case-configuration.yml | 48 --
.../dubbo-samples-hibernate/case-versions.conf | 25 -
.../pom.xml | 35 --
.../hibernate/samples/HibernateService.java | 26 -
.../dubbo/springboot/hibernate/samples/User.java | 28 -
.../pom.xml | 43 --
.../samples/HibernateConsumerApplication.java | 55 --
.../src/main/resources/application.yml | 29 -
.../src/main/resources/log4j2.xml | 29 -
.../springboot/hibernate/samples/HibernateIT.java | 41 --
.../pom.xml | 68 ---
.../hibernate/samples/EmbeddedZooKeeper.java | 309 ----------
.../samples/HibernateProviderApplication.java | 36 --
.../samples/impl/HibernateServiceImpl.java | 67 --
.../hibernate/samples/repository/UserModel.java | 40 --
.../samples/repository/UserRepository.java | 28 -
.../src/main/resources/application.yml | 39 --
.../resources/liquibase/liquibase-changelog.xml | 31 -
.../src/main/resources/log4j2.xml | 29 -
99-integration/dubbo-samples-hibernate/pom.xml | 194 ------
.../dubbo-samples-isolation-executor/README.md | 3 -
.../case-configuration.yml | 30 -
.../case-versions.conf | 25 -
.../dubbo-samples-isolation-executor/pom.xml | 132 ----
.../java/org/apache/dubbo/samples/Application.java | 22 -
.../apache/dubbo/samples/api/ApiIsolationIT.java | 193 ------
.../org/apache/dubbo/samples/spring/BaseTest.java | 105 ----
.../spring/annotation/AnnotationIsolationIT.java | 136 -----
.../annotation/consumer/dubbo/DemoServiceV1.java | 33 -
.../annotation/consumer/dubbo/HelloServiceV2.java | 33 -
.../annotation/consumer/dubbo/HelloServiceV3.java | 33 -
.../annotation/consumer/tri/DemoServiceV1.java | 33 -
.../annotation/consumer/tri/HelloServiceV2.java | 33 -
.../annotation/consumer/tri/HelloServiceV3.java | 33 -
.../annotation/provider/DemoServiceImplV1.java | 28 -
.../annotation/provider/HelloServiceImplV2.java | 33 -
.../annotation/provider/HelloServiceImplV3.java | 34 --
.../spring/support/DemoServiceExecutor.java | 30 -
.../spring/support/HelloServiceExecutor.java | 31 -
.../dubbo/samples/spring/xml/XmlIsolationIT.java | 56 --
.../apache/dubbo/samples/support/DemoService.java | 21 -
.../dubbo/samples/support/DemoServiceImpl.java | 26 -
.../apache/dubbo/samples/support/HelloService.java | 22 -
.../dubbo/samples/support/HelloServiceImpl.java | 24 -
.../META-INF/isolation/dubbo-consumer.xml | 51 --
.../META-INF/isolation/dubbo-provider.xml | 60 --
.../src/test/resources/log4j2-test.xml | 29 -
.../case-configuration.yml | 49 --
.../dubbo-samples-memory-server/case-versions.conf | 24 -
99-integration/dubbo-samples-memory-server/pom.xml | 118 ----
.../apache/dubbo/samples/api/GreetingsService.java | 24 -
.../org/apache/dubbo/samples/api/QosService.java | 21 -
.../apache/dubbo/samples/provider/Application.java | 56 --
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../dubbo/samples/provider/QosServiceImpl.java | 58 --
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 87 ---
.../case-configuration.yml | 49 --
.../case-versions.conf | 24 -
.../dubbo-samples-memory-tri-server/pom.xml | 118 ----
.../apache/dubbo/samples/api/GreetingsService.java | 24 -
.../org/apache/dubbo/samples/api/QosService.java | 21 -
.../apache/dubbo/samples/provider/Application.java | 54 --
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../dubbo/samples/provider/QosServiceImpl.java | 58 --
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 87 ---
.../dubbo-samples-metadata-report/README.md | 7 -
.../case-configuration.yml | 24 -
.../case-versions.conf | 25 -
.../pom.xml | 162 -----
.../configcenter/EmbeddedZooKeeper.java | 309 ----------
.../configcenter/MetadataConfigcenterConsumer.java | 62 --
.../configcenter/MetadataConfigcenterProvider.java | 85 ---
.../metadatareport/configcenter/ZKTools.java | 176 ------
.../configcenter/action/AnnotationAction.java | 37 --
.../configcenter/api/AnnotationService.java | 26 -
.../configcenter/impl/AnnotationServiceImpl.java | 33 -
.../src/main/resources/log4j2.xml | 29 -
.../resources/spring/dubbo-consumer.properties | 20 -
.../resources/spring/dubbo-provider.properties | 21 -
.../metadatareport/configcenter/MetadataIT.java | 166 -----
.../case-configuration.yml | 24 -
.../case-versions.conf | 25 -
.../pom.xml | 162 -----
.../local/annotation/EmbeddedZooKeeper.java | 309 ----------
.../MetadataLocalAnnotationConsumer.java | 72 ---
.../MetadataLocalAnnotationProvider.java | 82 ---
.../metadatareport/local/annotation/ZkUtil.java | 66 --
.../local/annotation/action/AnnotationAction.java | 37 --
.../local/annotation/api/AnnotationService.java | 26 -
.../annotation/impl/AnnotationServiceImpl.java | 34 --
.../src/main/resources/log4j2.xml | 29 -
.../resources/spring/dubbo-consumer.properties | 20 -
.../resources/spring/dubbo-provider.properties | 21 -
.../local/annotation/MetadataIT.java | 160 -----
.../case-configuration.yml | 24 -
.../case-versions.conf | 25 -
.../pom.xml | 162 -----
.../local/properties/EmbeddedZooKeeper.java | 309 ----------
.../MetadataLocalPropertiesConsumer.java | 49 --
.../MetadataLocalPropertiesProvider.java | 51 --
.../metadatareport/local/properties/ZkUtil.java | 65 --
.../local/properties/api/DemoService.java | 26 -
.../local/properties/impl/DemoServiceImpl.java | 38 --
.../src/main/resources/dubbo.properties | 23 -
.../src/main/resources/log4j2.xml | 29 -
.../main/resources/spring/metadata-consumer.xml | 34 --
.../main/resources/spring/metadata-provider.xml | 37 --
.../local/properties/MetadataIT.java | 156 -----
.../case-configuration.yml | 24 -
.../case-versions.conf | 25 -
.../pom.xml | 162 -----
.../local/xml/EmbeddedZooKeeper.java | 309 ----------
.../local/xml/MetadataLocalXmlConsumer.java | 48 --
.../local/xml/MetadataLocalXmlProvider.java | 52 --
.../samples/metadatareport/local/xml/ZkUtil.java | 59 --
.../metadatareport/local/xml/api/DemoService.java | 26 -
.../local/xml/impl/DemoServiceImpl.java | 38 --
.../src/main/resources/log4j2.xml | 29 -
.../main/resources/spring/metadata-consumer.xml | 35 --
.../main/resources/spring/metadata-provider.xml | 38 --
.../metadatareport/local/xml/MetadataIT.java | 151 -----
.../dubbo-samples-metadata-report/pom.xml | 46 --
.../case-configuration.yml | 48 --
.../dubbo-samples-multi-port/case-versions.conf | 25 -
99-integration/dubbo-samples-multi-port/pom.xml | 142 -----
.../apache/dubbo/samples/api/BlockingService.java | 25 -
.../dubbo/samples/api/ManagementService.java | 26 -
.../dubbo/samples/impl/BlockingServiceA.java | 46 --
.../dubbo/samples/impl/BlockingServiceB.java | 46 --
.../dubbo/samples/impl/BlockingServiceC.java | 46 --
.../dubbo/samples/impl/BlockingServiceD.java | 46 --
.../dubbo/samples/impl/BlockingServiceE.java | 46 --
.../dubbo/samples/impl/ManagementServiceImpl.java | 53 --
.../apache/dubbo/samples/provider/Application.java | 34 --
.../dubbo/samples/provider/DubboThreadPool.java | 49 --
.../com.alibaba.dubbo.common.threadpool.ThreadPool | 1 -
.../src/main/resources/log4j2.xml | 29 -
.../main/resources/spring/dubbo-demo-consumer.xml | 38 --
.../main/resources/spring/dubbo-demo-provider.xml | 51 --
.../dubbo/samples/test/BlockingServiceIT.java | 180 ------
99-integration/dubbo-samples-mybatis/README.md | 5 -
.../dubbo-samples-mybatis/case-configuration.yml | 48 --
.../dubbo-samples-mybatis/case-versions.conf | 25 -
.../dubbo-samples-spring-boot-mybatis-api/pom.xml | 35 --
.../springboot/mybatis/samples/MybatisService.java | 25 -
.../dubbo/springboot/mybatis/samples/User.java | 28 -
.../pom.xml | 43 --
.../samples/MybatisConsumerApplication.java | 52 --
.../src/main/resources/application.yml | 29 -
.../src/main/resources/log4j2.xml | 29 -
.../springboot/mybatis/samples/MybatisIT.java | 39 --
.../pom.xml | 74 ---
.../mybatis/samples/EmbeddedZooKeeper.java | 309 ----------
.../samples/MybatisProviderApplication.java | 40 --
.../springboot/mybatis/samples/dao/UserDao.java | 31 -
.../springboot/mybatis/samples/dao/UserModel.java | 28 -
.../mybatis/samples/impl/MybatisServiceImpl.java | 44 --
.../src/main/resources/application.yml | 39 --
.../resources/liquibase/liquibase-changelog.xml | 37 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/mapper/UserMapper.xml | 31 -
99-integration/dubbo-samples-mybatis/pom.xml | 189 ------
.../case-configuration.yml | 73 ---
.../dubbo-samples-nacos-legacy/case-versions.conf | 25 -
.../dubbo-samples-nacos-legacy-api/pom.xml | 32 -
.../dubbo/samples/legacy/api/DemoService.java | 23 -
.../dubbo-samples-nacos-legacy-consumer/pom.xml | 88 ---
.../src/main/java/FakeMain.java | 20 -
.../src/main/resources/log4j2.xml | 29 -
.../org/apache/dubbo/samples/legacy/LegacyIT.java | 139 -----
.../dubbo-samples-nacos-legacy-provider1/pom.xml | 93 ---
.../org/apache/dubbo/samples/legacy/Provider.java | 42 --
.../dubbo/samples/legacy/impl/DemoServiceImpl.java | 30 -
.../src/main/resources/dubbo.properties | 1 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo-samples-nacos-legacy-provider2/pom.xml | 76 ---
.../org/apache/dubbo/samples/legacy/Provider.java | 44 --
.../dubbo/samples/legacy/impl/DemoServiceImpl.java | 29 -
.../src/main/resources/dubbo.properties | 1 -
.../src/main/resources/log4j2.xml | 29 -
99-integration/dubbo-samples-nacos-legacy/pom.xml | 106 ----
.../case-configuration.yml | 74 ---
.../dubbo-samples-nacos-merge/case-versions.conf | 25 -
.../dubbo-samples-nacos-merge-api/pom.xml | 32 -
.../dubbo/samples/merge/api/MergeService.java | 28 -
.../dubbo-samples-nacos-merge-consumer/pom.xml | 83 ---
.../apache/dubbo/samples/merge/MergeConsumer.java | 35 --
.../apache/dubbo/samples/merge/MergeConsumer2.java | 35 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/merge-consumer.xml | 33 -
.../src/main/resources/spring/merge-consumer2.xml | 33 -
.../apache/dubbo/samples/merge/Consumer1IT.java | 48 --
.../apache/dubbo/samples/merge/Consumer2IT.java | 44 --
.../dubbo-samples-nacos-merge-provider1/pom.xml | 71 ---
.../apache/dubbo/samples/merge/MergeProvider.java | 34 --
.../dubbo/samples/merge/impl/MergeServiceImpl.java | 37 --
.../samples/merge/impl/MergeServiceImpl2.java | 37 --
.../src/main/resources/dubbo.properties | 1 -
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/merge-provider.xml | 44 --
.../dubbo-samples-nacos-merge-provider2/pom.xml | 71 ---
.../apache/dubbo/samples/merge/MergeProvider2.java | 36 --
.../samples/merge/impl/MergeServiceImpl3.java | 37 --
.../src/main/resources/dubbo.properties | 1 -
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/merge-provider2.xml | 38 --
99-integration/dubbo-samples-nacos-merge/pom.xml | 113 ----
.../case-configuration.yml | 23 -
.../case-versions.conf | 24 -
.../dubbo-samples-port-unification-netty3/pom.xml | 146 -----
.../apache/dubbo/samples/api/GreetingService.java | 23 -
.../apache/dubbo/samples/provider/Application.java | 58 --
.../samples/provider/GreetingServiceImpl.java | 27 -
.../dubbo/samples/zookeeper/EmbeddedZooKeeper.java | 309 ----------
.../org/apache/dubbo/samples/DemoClientIT.java | 46 --
.../case-configuration.yml | 48 --
.../case-versions.conf | 25 -
.../pom.xml | 31 -
.../prefer/serialization/api/DemoService.java | 22 -
.../pom.xml | 121 ----
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../samples/prefer/serialization/ConsumerIT.java | 248 --------
.../prefer/serialization/SerializationWrapper.java | 71 ---
...org.apache.dubbo.common.serialize.Serialization | 1 -
.../src/test/resources/log4j2-test.xml | 29 -
.../pom.xml | 114 ----
.../prefer/serialization/DemoServiceImpl.java | 26 -
.../prefer/serialization/DubboProvider.java | 268 --------
.../src/main/resources/log4j2.xml | 29 -
.../pom.xml | 155 -----
.../case-configuration.yml | 48 --
.../case-versions.conf | 25 -
.../pom.xml | 31 -
.../prefer/serialization/api/DemoService.java | 22 -
.../pom.xml | 104 ----
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../samples/prefer/serialization/ConsumerIT.java | 248 --------
.../prefer/serialization/SerializationWrapper.java | 71 ---
...org.apache.dubbo.common.serialize.Serialization | 1 -
.../src/test/resources/log4j2-test.xml | 29 -
.../pom.xml | 104 ----
.../prefer/serialization/DemoServiceImpl.java | 26 -
.../prefer/serialization/DubboProvider.java | 268 --------
.../src/main/resources/log4j2.xml | 29 -
.../pom.xml | 155 -----
.../case-configuration.yml | 109 ----
.../case-version-sources.conf | 19 -
.../case-versions.conf | 26 -
.../pom.xml | 171 ------
.../main/java/org/apache/dubbo/samples/App1.java | 83 ---
.../main/java/org/apache/dubbo/samples/App2.java | 83 ---
.../main/java/org/apache/dubbo/samples/App3.java | 83 ---
.../main/java/org/apache/dubbo/samples/App4.java | 83 ---
.../main/java/org/apache/dubbo/samples/App5.java | 83 ---
.../main/java/org/apache/dubbo/samples/App6.java | 83 ---
.../apache/dubbo/samples/api/ControlService.java | 25 -
.../org/apache/dubbo/samples/api/DemoService1.java | 24 -
.../org/apache/dubbo/samples/api/DemoService2.java | 24 -
.../org/apache/dubbo/samples/api/DemoService3.java | 24 -
.../dubbo/samples/impl/ControlServiceImpl.java | 64 --
.../dubbo/samples/impl/DemoService1Impl.java | 34 --
.../dubbo/samples/impl/DemoService2Impl.java | 34 --
.../dubbo/samples/impl/DemoService3Impl.java | 34 --
.../src/main/resources/log4j2.xml | 29 -
.../org/apache/dubbo/samples/test/ZookeeperIT.java | 424 -------------
.../case-configuration.yml | 109 ----
.../case-version-sources.conf | 19 -
.../case-versions.conf | 26 -
.../pom.xml | 171 ------
.../main/java/org/apache/dubbo/samples/App1.java | 83 ---
.../main/java/org/apache/dubbo/samples/App2.java | 83 ---
.../main/java/org/apache/dubbo/samples/App3.java | 83 ---
.../main/java/org/apache/dubbo/samples/App4.java | 83 ---
.../main/java/org/apache/dubbo/samples/App5.java | 83 ---
.../main/java/org/apache/dubbo/samples/App6.java | 83 ---
.../apache/dubbo/samples/api/ControlService.java | 25 -
.../org/apache/dubbo/samples/api/DemoService1.java | 24 -
.../org/apache/dubbo/samples/api/DemoService2.java | 24 -
.../org/apache/dubbo/samples/api/DemoService3.java | 24 -
.../dubbo/samples/impl/ControlServiceImpl.java | 64 --
.../dubbo/samples/impl/DemoService1Impl.java | 34 --
.../dubbo/samples/impl/DemoService2Impl.java | 34 --
.../dubbo/samples/impl/DemoService3Impl.java | 34 --
.../src/main/resources/log4j2.xml | 29 -
.../org/apache/dubbo/samples/test/ZookeeperIT.java | 424 -------------
.../case-configuration.yml | 109 ----
.../case-version-sources.conf | 19 -
.../case-versions.conf | 26 -
.../dubbo-samples-registry-test-curator/pom.xml | 171 ------
.../main/java/org/apache/dubbo/samples/App1.java | 82 ---
.../main/java/org/apache/dubbo/samples/App2.java | 82 ---
.../main/java/org/apache/dubbo/samples/App3.java | 82 ---
.../main/java/org/apache/dubbo/samples/App4.java | 82 ---
.../main/java/org/apache/dubbo/samples/App5.java | 82 ---
.../main/java/org/apache/dubbo/samples/App6.java | 82 ---
.../apache/dubbo/samples/api/ControlService.java | 25 -
.../org/apache/dubbo/samples/api/DemoService1.java | 24 -
.../org/apache/dubbo/samples/api/DemoService2.java | 24 -
.../org/apache/dubbo/samples/api/DemoService3.java | 24 -
.../dubbo/samples/impl/ControlServiceImpl.java | 64 --
.../dubbo/samples/impl/DemoService1Impl.java | 34 --
.../dubbo/samples/impl/DemoService2Impl.java | 34 --
.../dubbo/samples/impl/DemoService3Impl.java | 34 --
.../src/main/resources/log4j2.xml | 29 -
.../org/apache/dubbo/samples/test/ZookeeperIT.java | 424 -------------
.../case-configuration.yml | 84 ---
.../case-version-sources.conf | 19 -
.../case-versions.conf | 25 -
.../pom.xml | 133 ----
.../main/java/org/apache/dubbo/samples/App.java | 35 --
.../main/java/org/apache/dubbo/samples/App1.java | 88 ---
.../main/java/org/apache/dubbo/samples/App2.java | 88 ---
.../main/java/org/apache/dubbo/samples/App3.java | 87 ---
.../main/java/org/apache/dubbo/samples/App4.java | 88 ---
.../main/java/org/apache/dubbo/samples/App5.java | 88 ---
.../main/java/org/apache/dubbo/samples/App6.java | 88 ---
.../apache/dubbo/samples/api/ControlService.java | 25 -
.../org/apache/dubbo/samples/api/DemoService1.java | 24 -
.../org/apache/dubbo/samples/api/DemoService2.java | 24 -
.../org/apache/dubbo/samples/api/DemoService3.java | 24 -
.../dubbo/samples/impl/ControlServiceImpl.java | 70 ---
.../dubbo/samples/impl/DemoService1Impl.java | 34 --
.../dubbo/samples/impl/DemoService2Impl.java | 34 --
.../dubbo/samples/impl/DemoService3Impl.java | 34 --
.../src/main/resources/log4j2.xml | 29 -
.../org/apache/dubbo/samples/test/NacosIT.java | 427 -------------
.../src/test/resources/nacos-logback-stdout.xml | 91 ---
.../case-configuration.yml | 84 ---
.../case-version-sources.conf | 19 -
.../case-versions.conf | 27 -
.../pom.xml | 133 ----
.../main/java/org/apache/dubbo/samples/App.java | 35 --
.../main/java/org/apache/dubbo/samples/App1.java | 87 ---
.../main/java/org/apache/dubbo/samples/App2.java | 88 ---
.../main/java/org/apache/dubbo/samples/App3.java | 88 ---
.../main/java/org/apache/dubbo/samples/App4.java | 88 ---
.../main/java/org/apache/dubbo/samples/App5.java | 88 ---
.../main/java/org/apache/dubbo/samples/App6.java | 88 ---
.../apache/dubbo/samples/api/ControlService.java | 25 -
.../org/apache/dubbo/samples/api/DemoService1.java | 24 -
.../org/apache/dubbo/samples/api/DemoService2.java | 24 -
.../org/apache/dubbo/samples/api/DemoService3.java | 24 -
.../dubbo/samples/impl/ControlServiceImpl.java | 70 ---
.../dubbo/samples/impl/DemoService1Impl.java | 34 --
.../dubbo/samples/impl/DemoService2Impl.java | 34 --
.../dubbo/samples/impl/DemoService3Impl.java | 34 --
.../src/main/resources/log4j2.xml | 29 -
.../org/apache/dubbo/samples/test/NacosIT.java | 427 -------------
.../src/test/resources/nacos-logback-stdout.xml | 91 ---
.../case-configuration.yml | 84 ---
.../case-version-sources.conf | 19 -
.../case-versions.conf | 27 -
.../dubbo-samples-registry-test-nacos/pom.xml | 133 ----
.../main/java/org/apache/dubbo/samples/App.java | 35 --
.../main/java/org/apache/dubbo/samples/App1.java | 87 ---
.../main/java/org/apache/dubbo/samples/App2.java | 87 ---
.../main/java/org/apache/dubbo/samples/App3.java | 87 ---
.../main/java/org/apache/dubbo/samples/App4.java | 87 ---
.../main/java/org/apache/dubbo/samples/App5.java | 87 ---
.../main/java/org/apache/dubbo/samples/App6.java | 87 ---
.../apache/dubbo/samples/api/ControlService.java | 25 -
.../org/apache/dubbo/samples/api/DemoService1.java | 24 -
.../org/apache/dubbo/samples/api/DemoService2.java | 24 -
.../org/apache/dubbo/samples/api/DemoService3.java | 24 -
.../dubbo/samples/impl/ControlServiceImpl.java | 70 ---
.../dubbo/samples/impl/DemoService1Impl.java | 34 --
.../dubbo/samples/impl/DemoService2Impl.java | 34 --
.../dubbo/samples/impl/DemoService3Impl.java | 34 --
.../src/main/resources/log4j2.xml | 29 -
.../org/apache/dubbo/samples/test/NacosIT.java | 427 -------------
.../src/test/resources/nacos-logback-stdout.xml | 91 ---
.../case-configuration.yml | 45 --
.../case-versions.conf | 25 -
.../dubbo-samples-rest-withtoken-api/pom.xml | 37 --
.../samples/rest/withtoken/api/DemoService.java | 34 --
.../dubbo-samples-rest-withtoken-consumer/pom.xml | 91 ---
.../dubbo/rest/withtoken/consumer/Application.java | 50 --
.../src/main/resources/application.yml | 24 -
.../rest/withtoken/consumer/test/ConsumerTest.java | 38 --
.../dubbo-samples-rest-withtoken-provider/pom.xml | 81 ---
.../dubbo/rest/withtoken/provider/Application.java | 36 --
.../provider/service/impl/DemoServiceImpl.java | 34 --
.../src/main/resources/application.yml | 25 -
.../dubbo-samples-rest-withtoken/pom.xml | 111 ----
.../case-configuration.yml | 23 -
.../case-versions.conf | 24 -
.../dubbo-samples-router-chain-switch/pom.xml | 123 ----
.../apache/dubbo/samples/api/GreetingService.java | 23 -
.../apache/dubbo/samples/provider/Application.java | 79 ---
.../samples/provider/GreetingServiceImpl.java | 33 -
.../dubbo/samples/zookeeper/EmbeddedZooKeeper.java | 309 ----------
.../org/apache/dubbo/samples/DemoClientIT.java | 84 ---
.../org/apache/dubbo/samples/LongWaitRouter.java | 79 ---
.../dubbo/samples/LongWaitRouterFactory.java | 30 -
...bbo.rpc.cluster.router.state.StateRouterFactory | 1 -
.../dubbo-samples-sd-group/case-configuration.yml | 64 --
.../dubbo-samples-sd-group/case-versions.conf | 25 -
.../dubbo-samples-sd-group-api/pom.xml | 32 -
.../dubbo/samples/merge/api/MergeService.java | 28 -
.../dubbo-samples-sd-group-consumer/pom.xml | 88 ---
.../apache/dubbo/samples/merge/MergeConsumer.java | 35 --
.../apache/dubbo/samples/merge/MergeConsumer2.java | 35 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/merge-consumer.xml | 33 -
.../src/main/resources/spring/merge-consumer2.xml | 33 -
.../apache/dubbo/samples/merge/Consumer1IT.java | 58 --
.../apache/dubbo/samples/merge/Consumer2IT.java | 44 --
.../dubbo/samples/merge/MyAddressListener.java | 43 --
.../org.apache.dubbo.registry.AddressListener | 1 -
.../dubbo-samples-sd-group-provider1/pom.xml | 76 ---
.../apache/dubbo/samples/merge/MergeProvider.java | 34 --
.../dubbo/samples/merge/impl/MergeServiceImpl.java | 37 --
.../samples/merge/impl/MergeServiceImpl2.java | 37 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/merge-provider.xml | 44 --
.../dubbo-samples-sd-group-provider2/pom.xml | 76 ---
.../apache/dubbo/samples/merge/MergeProvider2.java | 36 --
.../samples/merge/impl/MergeServiceImpl3.java | 37 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/merge-provider2.xml | 38 --
99-integration/dubbo-samples-sd-group/pom.xml | 130 ----
.../dubbo-samples-sd-merge/case-configuration.yml | 64 --
.../dubbo-samples-sd-merge/case-versions.conf | 25 -
.../dubbo-samples-sd-merge-api/pom.xml | 32 -
.../dubbo/samples/merge/api/MergeService.java | 28 -
.../dubbo-samples-sd-merge-consumer/pom.xml | 88 ---
.../apache/dubbo/samples/merge/MergeConsumer.java | 35 --
.../apache/dubbo/samples/merge/MergeConsumer2.java | 35 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/merge-consumer.xml | 33 -
.../src/main/resources/spring/merge-consumer2.xml | 33 -
.../apache/dubbo/samples/merge/Consumer1IT.java | 58 --
.../apache/dubbo/samples/merge/Consumer2IT.java | 44 --
.../dubbo/samples/merge/MyAddressListener.java | 43 --
.../org.apache.dubbo.registry.AddressListener | 1 -
.../dubbo-samples-sd-merge-provider1/pom.xml | 76 ---
.../apache/dubbo/samples/merge/MergeProvider.java | 34 --
.../dubbo/samples/merge/impl/MergeServiceImpl.java | 37 --
.../samples/merge/impl/MergeServiceImpl2.java | 37 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/merge-provider.xml | 44 --
.../dubbo-samples-sd-merge-provider2/pom.xml | 76 ---
.../apache/dubbo/samples/merge/MergeProvider2.java | 36 --
.../samples/merge/impl/MergeServiceImpl3.java | 37 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/merge-provider2.xml | 38 --
99-integration/dubbo-samples-sd-merge/pom.xml | 130 ----
.../dubbo-samples-sd-version/README_zh.md | 6 -
.../case-configuration.yml | 63 --
.../dubbo-samples-sd-version/case-versions.conf | 25 -
99-integration/dubbo-samples-sd-version/pom.xml | 151 -----
.../dubbo/samples/version/VersionConsumer.java | 39 --
.../dubbo/samples/version/VersionProvider.java | 36 --
.../dubbo/samples/version/VersionProvider2.java | 36 --
.../dubbo/samples/version/api/VersionService.java | 26 -
.../samples/version/impl/VersionServiceImpl.java | 31 -
.../samples/version/impl/VersionServiceImpl2.java | 31 -
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/version-consumer.xml | 32 -
.../src/main/resources/spring/version-provider.xml | 40 --
.../main/resources/spring/version-provider2.xml | 39 --
.../dubbo/samples/version/MyAddressListener.java | 43 --
.../dubbo/samples/version/MyNettyTransporter.java | 49 --
.../dubbo/samples/version/VersionService1IT.java | 54 --
.../dubbo/samples/version/VersionService2IT.java | 54 --
.../samples/version/VersionServiceStarIT.java | 86 ---
.../org.apache.dubbo.registry.AddressListener | 1 -
.../internal/org.apache.dubbo.remoting.Transporter | 1 -
.../test/resources/spring/version-consumer-1.xml | 32 -
.../test/resources/spring/version-consumer-2.xml | 32 -
.../resources/spring/version-consumer-star.xml | 32 -
.../case-configuration.yml | 23 -
.../case-version-sources.conf | 19 -
.../case-versions.conf | 26 -
.../dubbo-samples-sentinel-compact/pom.xml | 198 ------
.../apache/samples/sentinel/EmbeddedZooKeeper.java | 309 ----------
.../samples/sentinel/FooConsumerBootstrap.java | 55 --
.../samples/sentinel/FooProviderBootstrap.java | 64 --
.../org/apache/samples/sentinel/FooService.java | 25 -
.../sentinel/consumer/ConsumerConfiguration.java | 61 --
.../sentinel/consumer/FooServiceConsumer.java | 36 --
.../samples/sentinel/provider/FooServiceImpl.java | 38 --
.../sentinel/provider/ProviderConfiguration.java | 59 --
.../org/apache/samples/sentinel/FooServiceIT.java | 52 --
.../case-configuration.yml | 23 -
.../case-version-sources.conf | 19 -
.../case-versions.conf | 26 -
.../dubbo-samples-sentinel-dubbo3/pom.xml | 202 -------
.../apache/samples/sentinel/EmbeddedZooKeeper.java | 309 ----------
.../samples/sentinel/FooConsumerBootstrap.java | 55 --
.../samples/sentinel/FooProviderBootstrap.java | 64 --
.../org/apache/samples/sentinel/FooService.java | 25 -
.../sentinel/consumer/ConsumerConfiguration.java | 61 --
.../sentinel/consumer/FooServiceConsumer.java | 36 --
.../samples/sentinel/provider/FooServiceImpl.java | 38 --
.../sentinel/provider/ProviderConfiguration.java | 59 --
.../org/apache/samples/sentinel/FooServiceIT.java | 52 --
.../case-configuration.yml | 49 --
.../case-versions.conf | 24 -
.../dubbo-samples-serialize-check/pom.xml | 161 -----
.../src/main/java/io/dubbo/test/DemoService2.java | 54 --
.../main/java/io/dubbo/test/DemoService2Impl.java | 141 -----
.../main/java/io/dubbo/test/NotSerializable.java | 46 --
.../src/main/java/io/dubbo/test/Parent.java | 47 --
.../src/main/java/io/dubbo/test/User.java | 57 --
.../src/main/java/io/dubbo/test/User2.java | 46 --
.../main/java/io/dubbo/test2/NotSerializable.java | 46 --
.../java/io/dubbo/test2/OthersSerializable.java | 47 --
.../org/apache/dubbo/samples/BeanGenericImpl.java | 55 --
.../org/apache/dubbo/samples/DemoService1.java | 54 --
.../org/apache/dubbo/samples/DemoService1Impl.java | 140 -----
.../java/org/apache/dubbo/samples/GenericImpl.java | 51 --
.../org/apache/dubbo/samples/NotSerializable.java | 46 --
.../main/java/org/apache/dubbo/samples/Parent.java | 47 --
.../java/org/apache/dubbo/samples/Provider.java | 134 ----
.../main/java/org/apache/dubbo/samples/User.java | 57 --
.../main/java/org/apache/dubbo/samples/User2.java | 47 --
.../src/main/resources/log4j2.xml | 29 -
.../test/java/org/apache/dubbo/test/CheckIT.java | 423 -------------
.../test/java/org/apache/dubbo/test/CheckIoIT.java | 423 -------------
.../case-configuration.yml | 24 -
.../case-versions.conf | 25 -
.../pom.xml | 169 ------
.../change/thread/EmbeddedZooKeeper.java | 309 ----------
.../thread/SerializationSwitchThreadConsumer.java | 35 --
.../thread/SerializationSwitchThreadProvider.java | 37 --
.../change/thread/api/DemoService.java | 24 -
.../change/thread/impl/DemoServiceImpl.java | 36 --
.../src/main/resources/log4j2.xml | 29 -
.../serialization-switch-thread-consumer.xml | 33 -
.../serialization-switch-thread-provider.xml | 40 --
.../serialization/change/thread/DemoServiceIT.java | 39 --
.../case-configuration.yml | 24 -
.../dubbo-samples-test-10704/case-versions.conf | 25 -
99-integration/dubbo-samples-test-10704/pom.xml | 170 ------
.../dubbo/samples/local/EmbeddedZooKeeper.java | 309 ----------
.../org/apache/dubbo/samples/local/LocalDemo.java | 41 --
.../dubbo/samples/local/api/DemoService.java | 28 -
.../dubbo/samples/local/impl/DemoServiceImpl.java | 52 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/dubbo-demo.xml | 38 --
.../apache/dubbo/samples/local/DemoServiceIT.java | 68 ---
.../dubbo/samples/local/DubboRequestFilter.java | 42 --
.../META-INF/dubbo/org.apache.dubbo.rpc.Filter | 1 -
.../case-configuration.yml | 33 -
.../dubbo-samples-test-11096/case-versions.conf | 25 -
99-integration/dubbo-samples-test-11096/pom.xml | 150 -----
.../java/org/apache/dubbo/samples/FakeMain.java | 25 -
.../org/apache/dubbo/samples/test/DemoService.java | 26 -
.../apache/dubbo/samples/test/DemoServiceImpl.java | 29 -
.../org/apache/dubbo/samples/test/MetadataIT.java | 272 ---------
.../case-configuration.yml | 46 --
.../dubbo-samples-test-11137/case-versions.conf | 25 -
99-integration/dubbo-samples-test-11137/pom.xml | 183 ------
.../java/org/apache/dubbo/samples/FakeMain.java | 25 -
.../org/apache/dubbo/samples/test/DemoService.java | 26 -
.../apache/dubbo/samples/test/DemoService2.java | 26 -
.../dubbo/samples/test/DemoService2Impl.java | 37 --
.../apache/dubbo/samples/test/DemoServiceImpl.java | 37 --
.../org/apache/dubbo/samples/test/NacosIT.java | 171 ------
.../org/apache/dubbo/samples/test/ZookeeperIT.java | 171 ------
.../src/test/resources/log4j2-test.xml | 29 -
.../case-configuration.yml | 35 --
.../dubbo-samples-test-11159/case-versions.conf | 25 -
99-integration/dubbo-samples-test-11159/pom.xml | 183 ------
.../java/org/apache/dubbo/samples/FakeMain.java | 25 -
.../org/apache/dubbo/samples/test/DemoService.java | 26 -
.../apache/dubbo/samples/test/DemoServiceImpl.java | 37 --
.../org/apache/dubbo/samples/test/ZookeeperIT.java | 46 --
.../src/test/resources/log4j2-test.xml | 29 -
.../case-configuration.yml | 23 -
.../dubbo-samples-test-11557/case-versions.conf | 24 -
99-integration/dubbo-samples-test-11557/pom.xml | 104 ----
.../apache/dubbo/samples/api/GreetingsService.java | 23 -
.../dubbo/samples/client/ConsumerFilter.java | 35 --
.../dubbo/samples/client/ProviderFilter.java | 38 --
.../apache/dubbo/samples/provider/Application.java | 47 --
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../META-INF/dubbo/org.apache.dubbo.rpc.Filter | 2 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 51 --
.../case-configuration.yml | 23 -
.../dubbo-samples-test-11558/case-versions.conf | 24 -
99-integration/dubbo-samples-test-11558/pom.xml | 105 ----
.../apache/dubbo/samples/api/GreetingsService.java | 27 -
.../dubbo/samples/client/ConsumerFilter.java | 47 --
.../dubbo/samples/client/ProviderFilter.java | 38 --
.../apache/dubbo/samples/provider/Application.java | 47 --
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../META-INF/dubbo/org.apache.dubbo.rpc.Filter | 2 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 54 --
.../case-configuration.yml | 23 -
.../dubbo-samples-test-11716/case-versions.conf | 24 -
99-integration/dubbo-samples-test-11716/pom.xml | 105 ----
.../apache/dubbo/samples/api/GreetingsService.java | 23 -
.../dubbo/samples/client/ConsumerFilter.java | 36 --
.../dubbo/samples/client/RpcContextFilter.java | 34 --
.../apache/dubbo/samples/provider/Application.java | 47 --
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../META-INF/dubbo/org.apache.dubbo.rpc.Filter | 2 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 52 --
.../case-configuration.yml | 23 -
.../dubbo-samples-test-11782/case-versions.conf | 24 -
99-integration/dubbo-samples-test-11782/pom.xml | 114 ----
.../apache/dubbo/samples/api/GreetingsService.java | 24 -
.../org/apache/dubbo/samples/api/QosService.java | 21 -
.../apache/dubbo/samples/provider/Application.java | 55 --
.../samples/provider/GreetingsServiceImpl.java | 62 --
.../dubbo/samples/provider/QosServiceImpl.java | 28 -
.../META-INF/dubbo/org.apache.dubbo.rpc.Filter | 1 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 70 ---
.../case-configuration.yml | 23 -
.../dubbo-samples-test-12208/case-versions.conf | 25 -
.../dubbo-samples-test-12208-api/pom.xml | 41 --
.../test/config/ApplicationConfigDelegate.java | 186 ------
.../dubbo/test/config/ArgumentConfigDelegate.java | 56 --
.../dubbo/test/config/ConsumerConfigDelegate.java | 451 --------------
.../dubbo/test/config/MethodConfigDelegate.java | 276 ---------
.../dubbo/test/config/ModuleConfigDelegate.java | 118 ----
.../dubbo/test/config/MonitorConfigDelegate.java | 121 ----
.../dubbo/test/config/ProtocolConfigDelegate.java | 328 ----------
.../dubbo/test/config/ProviderConfigDelegate.java | 673 ---------------------
.../dubbo/test/config/ReferenceConfigDelegate.java | 485 ---------------
.../dubbo/test/config/RegistryConfigDelegate.java | 231 -------
.../dubbo/test/config/ServiceConfigDelegate.java | 564 -----------------
.../dubbo-samples-test-12208-test/pom.xml | 100 ---
.../src/main/java/org/apache/dubbo/FakeMain.java | 25 -
.../org/apache/dubbo/test/config/DelegateIT.java | 99 ---
99-integration/dubbo-samples-test-12208/pom.xml | 134 ----
.../case-configuration.yml | 23 -
.../dubbo-samples-test-12376/case-versions.conf | 24 -
99-integration/dubbo-samples-test-12376/pom.xml | 111 ----
.../apache/dubbo/samples/api/BackendService.java | 24 -
.../apache/dubbo/samples/api/GreetingsService.java | 24 -
.../org/apache/dubbo/samples/api/HelloService.java | 24 -
.../org/apache/dubbo/samples/api/QosService.java | 21 -
.../samples/filter/ConsumerAlibabaFilter.java | 56 --
.../samples/filter/ConsumerClusterFilter.java | 56 --
.../dubbo/samples/filter/ConsumerFilter.java | 56 --
.../samples/filter/ProviderAlibabaFilter.java | 56 --
.../dubbo/samples/filter/ProviderFilter.java | 56 --
.../samples/loadbalance/AlibabaLoadBalance.java | 42 --
.../samples/loadbalance/ApacheLoadBalance.java | 41 --
.../apache/dubbo/samples/provider/Application.java | 94 ---
.../dubbo/samples/provider/BackendServiceImpl.java | 26 -
.../samples/provider/GreetingsServiceImpl.java | 34 --
.../dubbo/samples/provider/HelloServiceImpl.java | 33 -
.../dubbo/samples/provider/QosServiceImpl.java | 50 --
.../apache/dubbo/samples/router/AlibabaRouter.java | 57 --
.../dubbo/samples/router/AlibabaRouterFactory.java | 31 -
.../apache/dubbo/samples/router/ApacheRouter.java | 66 --
.../dubbo/samples/router/ApacheRouterFactory.java | 30 -
.../dubbo/samples/router/ApacheStateRouter.java | 53 --
.../samples/router/ApacheStateRouterFactory.java | 30 -
.../META-INF/dubbo/com.alibaba.dubbo.rpc.Filter | 2 -
.../com.alibaba.dubbo.rpc.cluster.LoadBalance | 2 -
.../com.alibaba.dubbo.rpc.cluster.RouterFactory | 1 -
.../META-INF/dubbo/org.apache.dubbo.rpc.Filter | 2 -
.../org.apache.dubbo.rpc.cluster.RouterFactory | 1 -
...g.apache.dubbo.rpc.cluster.filter.ClusterFilter | 1 -
...bbo.rpc.cluster.router.state.StateRouterFactory | 1 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 84 ---
.../case-configuration.yml | 23 -
.../dubbo-samples-test-12631/case-versions.conf | 24 -
99-integration/dubbo-samples-test-12631/pom.xml | 111 ----
.../apache/dubbo/samples/api/GreetingsService.java | 24 -
.../samples/client/ConsumerClusterFilter.java | 73 ---
.../dubbo/samples/client/ConsumerFilter.java | 72 ---
.../dubbo/samples/client/ProviderFilter.java | 60 --
.../apache/dubbo/samples/provider/Application.java | 47 --
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../META-INF/dubbo/org.apache.dubbo.rpc.Filter | 2 -
...g.apache.dubbo.rpc.cluster.filter.ClusterFilter | 1 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 52 --
.../case-configuration.yml | 23 -
.../dubbo-samples-test-12697/case-versions.conf | 25 -
99-integration/dubbo-samples-test-12697/pom.xml | 169 ------
.../org/apache/dubbo/samples/test/Provider.java | 35 --
.../apache/dubbo/samples/test/ProviderBean.java | 31 -
.../apache/dubbo/samples/test/api/DemoService.java | 24 -
.../dubbo/samples/test/impl/DemoServiceImpl.java | 36 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/provider.xml | 41 --
.../apache/dubbo/samples/test/ConsumerBean.java | 31 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 54 --
.../src/test/resources/spring/consumer.xml | 42 --
.../case-configuration.yml | 23 -
.../dubbo-samples-test-13078/case-versions.conf | 24 -
99-integration/dubbo-samples-test-13078/pom.xml | 116 ----
.../apache/dubbo/samples/api/GreetingsService.java | 22 -
.../apache/dubbo/samples/provider/Application.java | 44 --
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 74 ---
.../dubbo/samples/client/WireProtocolWrapper.java | 79 ---
.../org.apache.dubbo.remoting.api.WireProtocol | 1 -
.../case-configuration.yml | 23 -
.../dubbo-samples-test-13133/case-versions.conf | 25 -
99-integration/dubbo-samples-test-13133/pom.xml | 175 ------
.../org/apache/dubbo/samples/test/Provider.java | 52 --
.../apache/dubbo/samples/test/api/DemoService.java | 24 -
.../dubbo/samples/test/impl/DemoServiceImpl.java | 36 --
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/provider.xml | 35 --
.../org/apache/dubbo/samples/test/ConsumerIT.java | 49 --
.../src/test/resources/spring/consumer.xml | 38 --
.../case-configuration.yml | 23 -
.../dubbo-samples-test-13224/case-versions.conf | 24 -
99-integration/dubbo-samples-test-13224/pom.xml | 116 ----
.../apache/dubbo/samples/api/GreetingsService.java | 22 -
.../dubbo/samples/api/SerializationTypeWrap.java | 40 --
.../apache/dubbo/samples/provider/Application.java | 53 --
.../samples/provider/GreetingsServiceImpl.java | 30 -
.../samples/provider/SerializationSetWrapper.java | 172 ------
...org.apache.dubbo.common.serialize.Serialization | 1 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 162 -----
...org.apache.dubbo.common.serialize.Serialization | 1 -
.../case-configuration.yml | 43 --
.../case-versions.conf | 24 -
.../dubbo-samples-test-13360-32x/pom.xml | 155 -----
.../apache/dubbo/samples/api/GreetingsService.java | 22 -
.../apache/dubbo/samples/provider/Application.java | 32 -
.../samples/provider/GreetingsServiceImpl.java | 29 -
.../src/main/resources/application.properties | 8 -
.../dubbo/samples/client/GreetingServiceIT.java | 40 --
.../case-configuration.yml | 43 --
.../case-versions.conf | 24 -
.../dubbo-samples-test-13360-33x/pom.xml | 155 -----
.../apache/dubbo/samples/api/GreetingsService.java | 22 -
.../apache/dubbo/samples/provider/Application.java | 32 -
.../samples/provider/GreetingsServiceImpl.java | 29 -
.../src/main/resources/application.properties | 8 -
.../dubbo/samples/client/GreetingServiceIT.java | 40 --
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13436-1/case-versions.conf | 25 -
.../dubbo-samples-test-13436-1-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13436-1-consumer/pom.xml | 82 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 49 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13436-1-provider/pom.xml | 87 ---
.../apache/dubbo/samples/test/DemoServiceImpl.java | 24 -
.../apache/dubbo/samples/test/DubboProvider.java | 45 --
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13436-1/pom.xml | 111 ----
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13436-2/case-versions.conf | 25 -
.../dubbo-samples-test-13436-2-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13436-2-consumer/pom.xml | 87 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 44 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13436-2-provider/pom.xml | 82 ---
.../apache/dubbo/samples/test/DubboProvider.java | 47 --
.../dubbo/samples/test/GenericServiceImpl.java | 32 -
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13436-2/pom.xml | 111 ----
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13436-3/case-versions.conf | 25 -
.../dubbo-samples-test-13436-3-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13436-3-consumer/pom.xml | 82 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 49 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13436-3-provider/pom.xml | 82 ---
.../apache/dubbo/samples/test/DubboProvider.java | 47 --
.../dubbo/samples/test/GenericServiceImpl.java | 32 -
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13436-3/pom.xml | 111 ----
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13436-4/case-versions.conf | 25 -
.../dubbo-samples-test-13436-4-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13436-4-consumer/pom.xml | 87 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 44 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13436-4-provider/pom.xml | 87 ---
.../apache/dubbo/samples/test/DemoServiceImpl.java | 24 -
.../apache/dubbo/samples/test/DubboProvider.java | 45 --
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13436-4/pom.xml | 111 ----
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13441-1/case-versions.conf | 25 -
.../dubbo-samples-test-13441-1-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13441-1-consumer/pom.xml | 82 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 44 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13441-1-provider/pom.xml | 82 ---
.../apache/dubbo/samples/test/DemoServiceImpl.java | 24 -
.../apache/dubbo/samples/test/DubboProvider.java | 43 --
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13441-1/pom.xml | 105 ----
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13441-2/case-versions.conf | 25 -
.../dubbo-samples-test-13441-2-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13441-2-consumer/pom.xml | 82 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 44 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13441-2-provider/pom.xml | 88 ---
.../apache/dubbo/samples/test/DemoServiceImpl.java | 24 -
.../apache/dubbo/samples/test/DubboProvider.java | 48 --
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13441-2/pom.xml | 105 ----
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13441-3/case-versions.conf | 25 -
.../dubbo-samples-test-13441-3-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13441-3-consumer/pom.xml | 82 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 44 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13441-3-provider/pom.xml | 93 ---
.../apache/dubbo/samples/test/DemoServiceImpl.java | 24 -
.../apache/dubbo/samples/test/DubboProvider.java | 48 --
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13441-3/pom.xml | 112 ----
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13441-4/case-versions.conf | 25 -
.../dubbo-samples-test-13441-4-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13441-4-consumer/pom.xml | 93 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 44 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13441-4-provider/pom.xml | 82 ---
.../apache/dubbo/samples/test/DemoServiceImpl.java | 24 -
.../apache/dubbo/samples/test/DubboProvider.java | 44 --
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13441-4/pom.xml | 112 ----
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13441-5/case-versions.conf | 25 -
.../dubbo-samples-test-13441-5-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13441-5-consumer/pom.xml | 93 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 44 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13441-5-provider/pom.xml | 93 ---
.../apache/dubbo/samples/test/DemoServiceImpl.java | 24 -
.../apache/dubbo/samples/test/DubboProvider.java | 48 --
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13441-5/pom.xml | 112 ----
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13441-6/case-versions.conf | 25 -
.../dubbo-samples-test-13441-6-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13441-6-consumer/pom.xml | 88 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 44 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13441-6-provider/pom.xml | 82 ---
.../apache/dubbo/samples/test/DemoServiceImpl.java | 24 -
.../apache/dubbo/samples/test/DubboProvider.java | 44 --
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13441-6/pom.xml | 112 ----
.../case-configuration.yml | 48 --
.../dubbo-samples-test-13441-7/case-versions.conf | 25 -
.../dubbo-samples-test-13441-7-api/pom.xml | 31 -
.../org/apache/dubbo/samples/test/DemoService.java | 22 -
.../java/org/apache/dubbo/samples/test/User.java | 31 -
.../dubbo-samples-test-13441-7-consumer/pom.xml | 88 ---
.../java/org/apache/dubbo/samples/FakeMain.java | 23 -
.../org/apache/dubbo/samples/test/ConsumerIT.java | 44 --
.../src/test/resources/log4j.properties | 26 -
.../dubbo-samples-test-13441-7-provider/pom.xml | 88 ---
.../apache/dubbo/samples/test/DemoServiceImpl.java | 24 -
.../apache/dubbo/samples/test/DubboProvider.java | 48 --
.../src/main/resources/log4j.properties | 26 -
99-integration/dubbo-samples-test-13441-7/pom.xml | 112 ----
.../dubbo-samples-test-9806/case-configuration.yml | 33 -
.../dubbo-samples-test-9806/case-versions.conf | 25 -
99-integration/dubbo-samples-test-9806/pom.xml | 150 -----
.../java/org/apache/dubbo/samples/FakeMain.java | 25 -
.../org/apache/dubbo/samples/test/DemoService.java | 26 -
.../apache/dubbo/samples/test/DemoServiceImpl.java | 29 -
.../org/apache/dubbo/samples/test/MetadataIT.java | 139 -----
.../case-configuration.yml | 23 -
.../case-versions.conf | 25 -
.../dubbo-samples-test-abc-async/pom.xml | 175 ------
.../org/apache/dubbo/samples/test/Provider.java | 35 --
.../apache/dubbo/samples/test/api/DemoService.java | 28 -
.../dubbo/samples/test/api/DemoService2.java | 28 -
.../dubbo/samples/test/impl/DemoService2Impl.java | 39 --
.../dubbo/samples/test/impl/DemoServiceImpl.java | 116 ----
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/spring/provider.xml | 43 --
.../org/apache/dubbo/samples/test/ConsumerIT.java | 58 --
.../src/test/resources/spring/consumer.xml | 33 -
.../case-configuration.yml | 23 -
.../case-versions.conf | 24 -
.../dubbo-samples-test-register-3-3/pom.xml | 111 ----
.../apache/dubbo/samples/api/GreetingsService.java | 24 -
.../org/apache/dubbo/samples/api/QosService.java | 21 -
.../apache/dubbo/samples/provider/Application.java | 163 -----
.../samples/provider/DemoModuleDeployListener.java | 64 --
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../dubbo/samples/provider/QosServiceImpl.java | 28 -
...apache.dubbo.common.deploy.ModuleDeployListener | 1 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 151 -----
.../case-configuration.yml | 23 -
.../dubbo-samples-test-register/case-versions.conf | 24 -
99-integration/dubbo-samples-test-register/pom.xml | 111 ----
.../apache/dubbo/samples/api/GreetingsService.java | 24 -
.../org/apache/dubbo/samples/api/QosService.java | 21 -
.../apache/dubbo/samples/provider/Application.java | 163 -----
.../samples/provider/DemoModuleDeployListener.java | 65 --
.../samples/provider/GreetingsServiceImpl.java | 27 -
.../dubbo/samples/provider/QosServiceImpl.java | 28 -
...apache.dubbo.common.deploy.ModuleDeployListener | 1 -
.../src/main/resources/log4j2.xml | 29 -
.../dubbo/samples/client/GreetingServiceIT.java | 195 ------
99-integration/dubbo-samples-transaction/README.md | 48 --
.../case-configuration.yml | 135 -----
.../case-version-sources.conf | 19 -
.../dubbo-samples-transaction/case-versions.conf | 26 -
99-integration/dubbo-samples-transaction/pom.xml | 198 ------
.../main/java/org/apache/dubbo/samples/Order.java | 57 --
.../dubbo/samples/service/AccountService.java | 32 -
.../dubbo/samples/service/BusinessService.java | 34 --
.../apache/dubbo/samples/service/OrderService.java | 35 --
.../dubbo/samples/service/StorageService.java | 40 --
.../samples/service/impl/AccountServiceImpl.java | 50 --
.../samples/service/impl/BusinessServiceImpl.java | 65 --
.../samples/service/impl/OrderServiceImpl.java | 101 ----
.../samples/service/impl/StorageServiceImpl.java | 66 --
.../starter/DubboAccountServiceStarter.java | 44 --
.../dubbo/samples/starter/DubboBusinessTester.java | 41 --
.../samples/starter/DubboOrderServiceStarter.java | 43 --
.../starter/DubboStorageServiceStarter.java | 44 --
.../src/main/resources/docker/docker-compose.yml | 39 --
.../main/resources/docker/mysql/sql/dubbo-biz.sql | 49 --
.../main/resources/docker/mysql/sql/undo-log.sql | 28 -
.../src/main/resources/docker/seata/conf/file.conf | 63 --
.../main/resources/docker/seata/conf/registry.conf | 51 --
.../src/main/resources/file.conf | 57 --
.../src/main/resources/jdbc.properties | 29 -
.../src/main/resources/log4j2.xml | 29 -
.../src/main/resources/registry.conf | 51 --
.../resources/spring/dubbo-account-service.xml | 72 ---
.../src/main/resources/spring/dubbo-business.xml | 42 --
.../main/resources/spring/dubbo-order-service.xml | 75 ---
.../resources/spring/dubbo-storage-service.xml | 72 ---
.../apache/dubbo/samples/service/BusinessIT.java | 75 ---
99-integration/pom.xml | 93 ---
pom.xml | 1 -
993 files changed, 59615 deletions(-)
diff --git a/99-integration/dubbo-samples-empty-protection-nacos/case-configuration.yml b/99-integration/dubbo-samples-empty-protection-nacos/case-configuration.yml
deleted file mode 100644
index 7c614d1e8..000000000
--- a/99-integration/dubbo-samples-empty-protection-nacos/case-configuration.yml
+++ /dev/null
@@ -1,69 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-services:
- nacos-mysql:
- image: nacos-mysql:5.7
- environment:
- - MYSQL_DATABASE=nacos_devtest
- - MYSQL_ROOT_PASSWORD=root
- - MYSQL_USER=nacos
- - MYSQL_PASSWORD=nacos
- expose:
- - 3306
- healthcheck:
- # mysql host MUST be ip address, if the host is localhost, may connect via socket file, the port will be ignored
- test: [ "CMD", "mysqladmin" ,"ping", "-h", "127.0.0.1" ]
- interval: 5s
- timeout: 5s
- retries: 20
-
- nacos:
- image: nacos/nacos-server:v2.1.2
- environment:
- - PREFER_HOST_MODE=hostname
- - MODE=standalone
- - NACOS_AUTH_ENABLE=true
- - SPRING_DATASOURCE_PLATFORM=mysql
- - MYSQL_SERVICE_HOST=nacos-mysql
- - MYSQL_SERVICE_DB_NAME=nacos_devtest
- - MYSQL_SERVICE_PORT=3306
- - MYSQL_SERVICE_USER=nacos
- - MYSQL_SERVICE_PASSWORD=nacos
- - MYSQL_SERVICE_DB_PARAM=characterEncoding=utf8&connectTimeout=10000&socketTimeout=30000&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
- - JVM_XMS=512m
- - JVM_XMX=512m
- - JVM_XMN=256m
- expose:
- - 8848
- - 9848
- - 9555
- depends_on:
- - nacos-mysql
-
- dubbo-samples-empty-protection-nacos:
- type: test
- basedir: .
- tests:
- - "**/*IT.class"
- systemProps:
- - nacos.address=nacos
- - nacos.port=8848
- waitPortsBeforeRun:
- - nacos:8848
- depends_on:
- - nacos
-
diff --git a/99-integration/dubbo-samples-empty-protection-nacos/case-versions.conf b/99-integration/dubbo-samples-empty-protection-nacos/case-versions.conf
deleted file mode 100644
index b03fb1ae4..000000000
--- a/99-integration/dubbo-samples-empty-protection-nacos/case-versions.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# Spring app
-dubbo.version=3.*
-spring.version=4.*, 5.*
-java.version= [>= 8]
diff --git a/99-integration/dubbo-samples-empty-protection-nacos/pom.xml b/99-integration/dubbo-samples-empty-protection-nacos/pom.xml
deleted file mode 100644
index ee150ac0d..000000000
--- a/99-integration/dubbo-samples-empty-protection-nacos/pom.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.apache</groupId>
- <artifactId>apache</artifactId>
- <version>23</version>
- <relativePath/>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-samples-empty-protection-nacos</artifactId>
- <version>1.0-SNAPSHOT</version>
-
- <name>Dubbo Samples Empty Protection Nacos</name>
- <description>Dubbo Samples Empty Protection Nacos</description>
-
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <dubbo.version>3.2.6</dubbo.version>
- <spring.version>4.3.30.RELEASE</spring.version>
- <log4j2.version>2.20.0</log4j2.version>
- <junit.version>4.13.1</junit.version>
-
- <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-framework-bom</artifactId>
- <version>${spring.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-configcenter-nacos</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-registry-nacos</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2.version}</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <profiles>
- <!-- For jdk 11 above JavaEE annotation -->
- <profile>
- <id>javax.annotation</id>
- <activation>
- <jdk>[1.11,)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <version>1.3.2</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler-plugin.version}</version>
- </plugin>
- </plugins>
- </build>
-
- <repositories>
- <repository>
- <id>apache.snapshots.https</id>
- <name>Apache Development Snapshot Repository</name>
- <url>https://repository.apache.org/content/repositories/snapshots</url>
- <layout>default</layout>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>daily</updatePolicy>
- </snapshots>
- </repository>
- </repositories>
-</project>
diff --git a/99-integration/dubbo-samples-empty-protection-nacos/src/main/java/org/apache/dubbo/samples/Main.java b/99-integration/dubbo-samples-empty-protection-nacos/src/main/java/org/apache/dubbo/samples/Main.java
deleted file mode 100644
index bc48d411f..000000000
--- a/99-integration/dubbo-samples-empty-protection-nacos/src/main/java/org/apache/dubbo/samples/Main.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples;
-
-public class Main {
- public static void main(String[] args) {
- System.out.println("Hello world!");
- }
-}
\ No newline at end of file
diff --git a/99-integration/dubbo-samples-empty-protection-nacos/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java b/99-integration/dubbo-samples-empty-protection-nacos/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
deleted file mode 100644
index 8a3fc7d44..000000000
--- a/99-integration/dubbo-samples-empty-protection-nacos/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.api;
-
-public interface GreetingsService {
-
- String sayHi(String name);
-}
diff --git a/99-integration/dubbo-samples-empty-protection-nacos/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java b/99-integration/dubbo-samples-empty-protection-nacos/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java
deleted file mode 100644
index d0d444843..000000000
--- a/99-integration/dubbo-samples-empty-protection-nacos/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.provider;
-
-import org.apache.dubbo.samples.api.GreetingsService;
-
-public class GreetingsServiceImpl implements GreetingsService {
- @Override
- public String sayHi(String name) {
- return "hi, " + name;
- }
-}
diff --git a/99-integration/dubbo-samples-empty-protection-nacos/src/main/resources/log4j2.xml b/99-integration/dubbo-samples-empty-protection-nacos/src/main/resources/log4j2.xml
deleted file mode 100644
index 69e1321d2..000000000
--- a/99-integration/dubbo-samples-empty-protection-nacos/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT" follow="true">
- <PatternLayout pattern="%style{%d{HH:mm:ss.SSS}}{Magenta} %style{|-}{White}%highlight{%-5p} [%t] %style{%40.40c}{Cyan}:%style{%-3L}{Blue} %style{-|}{White} %m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect)}" disableAnsi="false" charset="UTF-8"/>
- </Console>
- </Appenders>
- <Loggers>
- <Root level="info">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
diff --git a/99-integration/dubbo-samples-empty-protection-nacos/src/test/java/org/apache/dubbo/samples/empty/DefaultIT.java b/99-integration/dubbo-samples-empty-protection-nacos/src/test/java/org/apache/dubbo/samples/empty/DefaultIT.java
deleted file mode 100644
index d555e70e0..000000000
--- a/99-integration/dubbo-samples-empty-protection-nacos/src/test/java/org/apache/dubbo/samples/empty/DefaultIT.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.empty;
-
-import org.apache.dubbo.common.Version;
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.qos.command.impl.Offline;
-import org.apache.dubbo.rpc.model.FrameworkModel;
-import org.apache.dubbo.samples.api.GreetingsService;
-import org.apache.dubbo.samples.provider.GreetingsServiceImpl;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class DefaultIT {
- @After
- public void after() {
- FrameworkModel.destroyAll();
- }
-
- @Test
- public void testDefault() throws InterruptedException {
- String nacosAddress = System.getProperty("nacos.address", "localhost");
- String nacosPort = System.getProperty("nacos.port", "8848");
-
- ServiceConfig<GreetingsService> serviceConfig = new ServiceConfig<>();
- serviceConfig.setInterface(GreetingsService.class);
- serviceConfig.setRef(new GreetingsServiceImpl());
- serviceConfig.setApplication(new ApplicationConfig("provider"));
- serviceConfig.setRegistry(new RegistryConfig("nacos://" + nacosAddress + ":" + nacosPort + "?username=nacos&password=nacos"));
- serviceConfig.export();
- Thread.sleep(1000);
-
- ReferenceConfig<GreetingsService> referenceConfig = new ReferenceConfig<>();
- referenceConfig.setInterface(GreetingsService.class);
- referenceConfig.setRegistry(new RegistryConfig("nacos://" + nacosAddress + ":" + nacosPort + "?username=nacos&password=nacos"));
- referenceConfig.setScope("remote");
- GreetingsService greetingsService = referenceConfig.get();
-
- Assert.assertEquals("hi, dubbo", greetingsService.sayHi("dubbo"));
-
- new Offline(FrameworkModel.defaultModel()).offline("org.apache.dubbo.samples.api.GreetingsService");
- Thread.sleep(1000);
-
- if (Version.getVersion().compareTo("3.2.0") >= 0) {
- try {
- greetingsService.sayHi("dubbo");
- Assert.fail();
- } catch (Exception e) {
- Assert.assertTrue(e.getMessage().contains("No provider available"));
- }
- } else {
- Assert.assertEquals("hi, dubbo", greetingsService.sayHi("dubbo"));
- }
- }
-}
diff --git a/99-integration/dubbo-samples-empty-protection-nacos/src/test/java/org/apache/dubbo/samples/empty/NoProtectIT.java b/99-integration/dubbo-samples-empty-protection-nacos/src/test/java/org/apache/dubbo/samples/empty/NoProtectIT.java
deleted file mode 100644
index 03b722727..000000000
--- a/99-integration/dubbo-samples-empty-protection-nacos/src/test/java/org/apache/dubbo/samples/empty/NoProtectIT.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.empty;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.qos.command.impl.Offline;
-import org.apache.dubbo.rpc.model.FrameworkModel;
-import org.apache.dubbo.samples.api.GreetingsService;
-import org.apache.dubbo.samples.provider.GreetingsServiceImpl;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class NoProtectIT {
- @After
- public void after() {
- FrameworkModel.destroyAll();
- }
-
- @Test
- public void testNoProtect() throws InterruptedException {
- String nacosAddress = System.getProperty("nacos.address", "localhost");
- String nacosPort = System.getProperty("nacos.port", "8848");
-
- ServiceConfig<GreetingsService> serviceConfig = new ServiceConfig<>();
- serviceConfig.setInterface(GreetingsService.class);
- serviceConfig.setRef(new GreetingsServiceImpl());
- serviceConfig.setApplication(new ApplicationConfig("provider"));
- serviceConfig.setRegistry(new RegistryConfig("nacos://" + nacosAddress + ":" + nacosPort + "?enable-empty-protection=false&username=nacos&password=nacos"));
- serviceConfig.export();
- Thread.sleep(1000);
-
- ReferenceConfig<GreetingsService> referenceConfig = new ReferenceConfig<>();
- referenceConfig.setInterface(GreetingsService.class);
- referenceConfig.setRegistry(new RegistryConfig("nacos://" + nacosAddress + ":" + nacosPort + "?enable-empty-protection=false&username=nacos&password=nacos"));
- referenceConfig.setScope("remote");
- GreetingsService greetingsService = referenceConfig.get();
-
- Assert.assertEquals("hi, dubbo", greetingsService.sayHi("dubbo"));
-
- new Offline(FrameworkModel.defaultModel()).offline("org.apache.dubbo.samples.api.GreetingsService");
- Thread.sleep(1000);
-
- try {
- greetingsService.sayHi("dubbo");
- Assert.fail();
- } catch (Exception e) {
- Assert.assertTrue(e.getMessage().contains("No provider available"));
- }
-
- }
-}
diff --git a/99-integration/dubbo-samples-empty-protection-nacos/src/test/java/org/apache/dubbo/samples/empty/ProtectIT.java b/99-integration/dubbo-samples-empty-protection-nacos/src/test/java/org/apache/dubbo/samples/empty/ProtectIT.java
deleted file mode 100644
index 3c5e77172..000000000
--- a/99-integration/dubbo-samples-empty-protection-nacos/src/test/java/org/apache/dubbo/samples/empty/ProtectIT.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.empty;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.qos.command.impl.Offline;
-import org.apache.dubbo.rpc.model.FrameworkModel;
-import org.apache.dubbo.samples.api.GreetingsService;
-import org.apache.dubbo.samples.provider.GreetingsServiceImpl;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class ProtectIT {
- @After
- public void after() {
- FrameworkModel.destroyAll();
- }
-
- @Test
- public void testProtect() throws InterruptedException {
- String nacosAddress = System.getProperty("nacos.address", "localhost");
- String nacosPort = System.getProperty("nacos.port", "8848");
-
- ServiceConfig<GreetingsService> serviceConfig = new ServiceConfig<>();
- serviceConfig.setInterface(GreetingsService.class);
- serviceConfig.setRef(new GreetingsServiceImpl());
- serviceConfig.setApplication(new ApplicationConfig("provider"));
- serviceConfig.setRegistry(new RegistryConfig("nacos://" + nacosAddress + ":" + nacosPort + "?enable-empty-protection=true&username=nacos&password=nacos"));
- serviceConfig.export();
- Thread.sleep(1000);
-
- ReferenceConfig<GreetingsService> referenceConfig = new ReferenceConfig<>();
- referenceConfig.setInterface(GreetingsService.class);
- referenceConfig.setRegistry(new RegistryConfig("nacos://" + nacosAddress + ":" + nacosPort + "?enable-empty-protection=true&username=nacos&password=nacos"));
- referenceConfig.setScope("remote");
- GreetingsService greetingsService = referenceConfig.get();
-
- Assert.assertEquals("hi, dubbo", greetingsService.sayHi("dubbo"));
-
- new Offline(FrameworkModel.defaultModel()).offline("org.apache.dubbo.samples.api.GreetingsService");
- Thread.sleep(1000);
-
- Assert.assertEquals("hi, dubbo", greetingsService.sayHi("dubbo"));
- }
-}
diff --git a/99-integration/dubbo-samples-empty-protection/case-configuration.yml b/99-integration/dubbo-samples-empty-protection/case-configuration.yml
deleted file mode 100644
index 6ff3fd379..000000000
--- a/99-integration/dubbo-samples-empty-protection/case-configuration.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-services:
- dubbo-samples-empty-protection:
- type: test
- basedir: .
- tests:
- - "**/*IT.class"
diff --git a/99-integration/dubbo-samples-empty-protection/case-versions.conf b/99-integration/dubbo-samples-empty-protection/case-versions.conf
deleted file mode 100644
index b03fb1ae4..000000000
--- a/99-integration/dubbo-samples-empty-protection/case-versions.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# Spring app
-dubbo.version=3.*
-spring.version=4.*, 5.*
-java.version= [>= 8]
diff --git a/99-integration/dubbo-samples-empty-protection/pom.xml b/99-integration/dubbo-samples-empty-protection/pom.xml
deleted file mode 100644
index 716d15fd6..000000000
--- a/99-integration/dubbo-samples-empty-protection/pom.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.apache</groupId>
- <artifactId>apache</artifactId>
- <version>23</version>
- <relativePath/>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-samples-empty-protection</artifactId>
- <version>1.0-SNAPSHOT</version>
-
- <name>Dubbo Samples Empty Protection</name>
- <description>Dubbo Samples Empty Protection</description>
-
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <dubbo.version>3.2.6</dubbo.version>
- <spring.version>4.3.30.RELEASE</spring.version>
- <log4j2.version>2.20.0</log4j2.version>
- <junit.version>4.13.1</junit.version>
-
- <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-framework-bom</artifactId>
- <version>${spring.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <artifactId>logback-classic</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>logback-core</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <type>pom</type>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2.version}</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
- </dependency>
-
- <!-- Embedded Zookeeper Server Dependencies -->
- <dependency>
- <groupId>io.dropwizard.metrics</groupId>
- <artifactId>metrics-core</artifactId>
- <version>4.1.12.1</version>
- </dependency>
- <dependency>
- <groupId>org.xerial.snappy</groupId>
- <artifactId>snappy-java</artifactId>
- <version>1.1.10.5</version>
- </dependency>
- </dependencies>
-
- <profiles>
- <!-- For jdk 11 above JavaEE annotation -->
- <profile>
- <id>javax.annotation</id>
- <activation>
- <jdk>[1.11,)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <version>1.3.2</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler-plugin.version}</version>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/EmbeddedZooKeeper.java b/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/EmbeddedZooKeeper.java
deleted file mode 100644
index fd168f0bc..000000000
--- a/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/EmbeddedZooKeeper.java
+++ /dev/null
@@ -1,309 +0,0 @@
-
-/*
- * Copyright 2014 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples;
-
-import org.apache.zookeeper.server.ServerConfig;
-import org.apache.zookeeper.server.ZooKeeperServerMain;
-import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.SmartLifecycle;
-import org.springframework.util.ErrorHandler;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.ServerSocket;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-import java.util.UUID;
-import java.util.stream.Collectors;
-
-/**
- * from: https://github.com/spring-projects/spring-xd/blob/v1.3.1.RELEASE/spring-xd-dirt/src/main/java/org/springframework/xd/dirt/zookeeper/ZooKeeperUtils.java
- * <p>
- * Helper class to start an embedded instance of standalone (non clustered) ZooKeeper.
- * <p>
- * NOTE: at least an external standalone server (if not an ensemble) are recommended, even for
- * {@link org.springframework.xd.dirt.server.singlenode.SingleNodeApplication}
- *
- * @author Patrick Peralta
- * @author Mark Fisher
- * @author David Turanski
- */
-public class EmbeddedZooKeeper implements SmartLifecycle {
-
- private static final Random RANDOM = new Random();
-
- /**
- * Logger.
- */
- private static final Logger logger = LoggerFactory.getLogger(EmbeddedZooKeeper.class);
-
- /**
- * ZooKeeper client port. This will be determined dynamically upon startup.
- */
- private final int clientPort;
-
- /**
- * Whether to auto-start. Default is true.
- */
- private boolean autoStartup = true;
-
- /**
- * Lifecycle phase. Default is 0.
- */
- private int phase = 0;
-
- /**
- * Thread for running the ZooKeeper server.
- */
- private volatile Thread zkServerThread;
-
- /**
- * ZooKeeper server.
- */
- private volatile ZooKeeperServerMain zkServer;
-
- /**
- * {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread.
- */
- private ErrorHandler errorHandler;
-
- private boolean daemon = true;
-
- /**
- * Construct an EmbeddedZooKeeper with a random port.
- */
- public EmbeddedZooKeeper() {
- clientPort = findRandomPort(30000, 65535);
- }
-
- /**
- * Construct an EmbeddedZooKeeper with the provided port.
- *
- * @param clientPort port for ZooKeeper server to bind to
- */
- public EmbeddedZooKeeper(int clientPort, boolean daemon) {
- this.clientPort = clientPort;
- this.daemon = daemon;
- }
-
- /**
- * Returns the port that clients should use to connect to this embedded server.
- *
- * @return dynamically determined client port
- */
- public int getClientPort() {
- return this.clientPort;
- }
-
- /**
- * Specify whether to start automatically. Default is true.
- *
- * @param autoStartup whether to start automatically
- */
- public void setAutoStartup(boolean autoStartup) {
- this.autoStartup = autoStartup;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAutoStartup() {
- return this.autoStartup;
- }
-
- /**
- * Specify the lifecycle phase for the embedded server.
- *
- * @param phase the lifecycle phase
- */
- public void setPhase(int phase) {
- this.phase = phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getPhase() {
- return this.phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isRunning() {
- return (zkServerThread != null);
- }
-
- /**
- * Start the ZooKeeper server in a background thread.
- * <p>
- * Register an error handler via {@link #setErrorHandler} in order to handle
- * any exceptions thrown during startup or execution.
- */
- @Override
- public synchronized void start() {
- if (zkServerThread == null) {
- zkServerThread = new Thread(new ServerRunnable(), "ZooKeeper Server Starter");
- zkServerThread.setDaemon(daemon);
- zkServerThread.start();
- }
- }
-
- /**
- * Shutdown the ZooKeeper server.
- */
- @Override
- public synchronized void stop() {
- if (zkServerThread != null) {
- // The shutdown method is protected...thus this hack to invoke it.
- // This will log an exception on shutdown; see
- // https://issues.apache.org/jira/browse/ZOOKEEPER-1873 for details.
- try {
- Method shutdown = ZooKeeperServerMain.class.getDeclaredMethod("shutdown");
- shutdown.setAccessible(true);
- shutdown.invoke(zkServer);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- // It is expected that the thread will exit after
- // the server is shutdown; this will block until
- // the shutdown is complete.
- try {
- zkServerThread.join(5000);
- zkServerThread = null;
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- logger.warn("Interrupted while waiting for embedded ZooKeeper to exit");
- // abandoning zk thread
- zkServerThread = null;
- }
- }
- }
-
- /**
- * Stop the server if running and invoke the callback when complete.
- */
- @Override
- public void stop(Runnable callback) {
- stop();
- callback.run();
- }
-
- /**
- * Provide an {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread. If none
- * is provided, only error-level logging will occur.
- *
- * @param errorHandler the {@link ErrorHandler} to be invoked
- */
- public void setErrorHandler(ErrorHandler errorHandler) {
- this.errorHandler = errorHandler;
- }
-
- /**
- * Runnable implementation that starts the ZooKeeper server.
- */
- private class ServerRunnable implements Runnable {
-
- @Override
- public void run() {
- try {
- Properties properties = new Properties();
- File file = new File(System.getProperty("java.io.tmpdir")
- + File.separator + UUID.randomUUID());
- file.deleteOnExit();
- properties.setProperty("dataDir", file.getAbsolutePath());
- properties.setProperty("clientPort", String.valueOf(clientPort));
-
- QuorumPeerConfig quorumPeerConfig = new QuorumPeerConfig();
- quorumPeerConfig.parseProperties(properties);
-
- zkServer = new ZooKeeperServerMain();
- ServerConfig configuration = new ServerConfig();
- configuration.readFrom(quorumPeerConfig);
-
- System.setProperty("zookeeper.admin.enableServer", "false");
-
- zkServer.runFromConfig(configuration);
- } catch (Exception e) {
- if (errorHandler != null) {
- errorHandler.handleError(e);
- } else {
- logger.error("Exception running embedded ZooKeeper", e);
- }
- }
- }
- }
-
- /**
- * Workaround for SocketUtils.findRandomPort() deprecation.
- *
- * @param min min port
- * @param max max port
- * @return a random generated available port
- */
- private static int findRandomPort(int min, int max) {
- if (min < 1024) {
- throw new IllegalArgumentException("Max port shouldn't be less than 1024.");
- }
-
- if (max > 65535) {
- throw new IllegalArgumentException("Max port shouldn't be greater than 65535.");
- }
-
- if (min > max) {
- throw new IllegalArgumentException("Min port shouldn't be greater than max port.");
- }
-
- int port = 0;
- int counter = 0;
-
- // Workaround for legacy JDK doesn't support Random.nextInt(min, max).
- List<Integer> randomInts = RANDOM.ints(min, max + 1)
- .limit(max - min)
- .mapToObj(Integer::valueOf)
- .collect(Collectors.toList());
-
- do {
- if (counter > max - min) {
- throw new IllegalStateException("Unable to find a port between " + min + "-" + max);
- }
-
- port = randomInts.get(counter);
- counter++;
- } while (isPortInUse(port));
-
- return port;
- }
-
- private static boolean isPortInUse(int port) {
- try (ServerSocket ignored = new ServerSocket(port)) {
- return false;
- } catch (IOException e) {
- // continue
- }
- return true;
- }
-}
diff --git a/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/Main.java b/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/Main.java
deleted file mode 100644
index bc48d411f..000000000
--- a/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/Main.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples;
-
-public class Main {
- public static void main(String[] args) {
- System.out.println("Hello world!");
- }
-}
\ No newline at end of file
diff --git a/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java b/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
deleted file mode 100644
index 8a3fc7d44..000000000
--- a/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.api;
-
-public interface GreetingsService {
-
- String sayHi(String name);
-}
diff --git a/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java b/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java
deleted file mode 100644
index d0d444843..000000000
--- a/99-integration/dubbo-samples-empty-protection/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.provider;
-
-import org.apache.dubbo.samples.api.GreetingsService;
-
-public class GreetingsServiceImpl implements GreetingsService {
- @Override
- public String sayHi(String name) {
- return "hi, " + name;
- }
-}
diff --git a/99-integration/dubbo-samples-empty-protection/src/test/java/org/apache/dubbo/samples/empty/DefaultIT.java b/99-integration/dubbo-samples-empty-protection/src/test/java/org/apache/dubbo/samples/empty/DefaultIT.java
deleted file mode 100644
index 7440eb20f..000000000
--- a/99-integration/dubbo-samples-empty-protection/src/test/java/org/apache/dubbo/samples/empty/DefaultIT.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.empty;
-
-import org.apache.dubbo.common.Version;
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.qos.command.impl.Offline;
-import org.apache.dubbo.rpc.model.FrameworkModel;
-import org.apache.dubbo.samples.EmbeddedZooKeeper;
-import org.apache.dubbo.samples.api.GreetingsService;
-import org.apache.dubbo.samples.provider.GreetingsServiceImpl;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class DefaultIT {
- @After
- public void after() {
- FrameworkModel.destroyAll();
- }
-
- @Test
- public void testDefault() throws InterruptedException {
- new EmbeddedZooKeeper(2181, false).start();
-
- ServiceConfig<GreetingsService> serviceConfig = new ServiceConfig<>();
- serviceConfig.setInterface(GreetingsService.class);
- serviceConfig.setRef(new GreetingsServiceImpl());
- serviceConfig.setApplication(new ApplicationConfig("provider"));
- serviceConfig.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
- serviceConfig.export();
-
- ReferenceConfig<GreetingsService> referenceConfig = new ReferenceConfig<>();
- referenceConfig.setInterface(GreetingsService.class);
- referenceConfig.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
- referenceConfig.setScope("remote");
- GreetingsService greetingsService = referenceConfig.get();
-
- Assert.assertEquals("hi, dubbo", greetingsService.sayHi("dubbo"));
-
- new Offline(FrameworkModel.defaultModel()).offline("org.apache.dubbo.samples.api.GreetingsService");
- Thread.sleep(1000);
-
- if (Version.getVersion().compareTo("3.2.0") >= 0) {
- try {
- greetingsService.sayHi("dubbo");
- Assert.fail();
- } catch (Exception e) {
- Assert.assertTrue(e.getMessage().contains("No provider available"));
- }
- } else {
- Assert.assertEquals("hi, dubbo", greetingsService.sayHi("dubbo"));
- }
- }
-}
diff --git a/99-integration/dubbo-samples-empty-protection/src/test/java/org/apache/dubbo/samples/empty/NoProtectIT.java b/99-integration/dubbo-samples-empty-protection/src/test/java/org/apache/dubbo/samples/empty/NoProtectIT.java
deleted file mode 100644
index 6462316c8..000000000
--- a/99-integration/dubbo-samples-empty-protection/src/test/java/org/apache/dubbo/samples/empty/NoProtectIT.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.empty;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.qos.command.impl.Offline;
-import org.apache.dubbo.rpc.model.FrameworkModel;
-import org.apache.dubbo.samples.EmbeddedZooKeeper;
-import org.apache.dubbo.samples.api.GreetingsService;
-import org.apache.dubbo.samples.provider.GreetingsServiceImpl;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class NoProtectIT {
- @After
- public void after() {
- FrameworkModel.destroyAll();
- }
-
- @Test
- public void testNoProtect() throws InterruptedException {
- new EmbeddedZooKeeper(2181, false).start();
-
- ServiceConfig<GreetingsService> serviceConfig = new ServiceConfig<>();
- serviceConfig.setInterface(GreetingsService.class);
- serviceConfig.setRef(new GreetingsServiceImpl());
- serviceConfig.setApplication(new ApplicationConfig("provider"));
- serviceConfig.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181?enable-empty-protection=false"));
- serviceConfig.export();
-
- ReferenceConfig<GreetingsService> referenceConfig = new ReferenceConfig<>();
- referenceConfig.setInterface(GreetingsService.class);
- referenceConfig.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181?enable-empty-protection=false"));
- referenceConfig.setScope("remote");
- GreetingsService greetingsService = referenceConfig.get();
-
- Assert.assertEquals("hi, dubbo", greetingsService.sayHi("dubbo"));
-
- new Offline(FrameworkModel.defaultModel()).offline("org.apache.dubbo.samples.api.GreetingsService");
- Thread.sleep(1000);
-
- try {
- greetingsService.sayHi("dubbo");
- Assert.fail();
- } catch (Exception e) {
- Assert.assertTrue(e.getMessage().contains("No provider available"));
- }
-
- }
-}
diff --git a/99-integration/dubbo-samples-empty-protection/src/test/java/org/apache/dubbo/samples/empty/ProtectIT.java b/99-integration/dubbo-samples-empty-protection/src/test/java/org/apache/dubbo/samples/empty/ProtectIT.java
deleted file mode 100644
index b3aeb20e9..000000000
--- a/99-integration/dubbo-samples-empty-protection/src/test/java/org/apache/dubbo/samples/empty/ProtectIT.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.empty;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.qos.command.impl.Offline;
-import org.apache.dubbo.rpc.model.FrameworkModel;
-import org.apache.dubbo.samples.EmbeddedZooKeeper;
-import org.apache.dubbo.samples.api.GreetingsService;
-import org.apache.dubbo.samples.provider.GreetingsServiceImpl;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class ProtectIT {
- @After
- public void after() {
- FrameworkModel.destroyAll();
- }
-
- @Test
- public void testProtect() throws InterruptedException {
- new EmbeddedZooKeeper(2181, false).start();
-
- ServiceConfig<GreetingsService> serviceConfig = new ServiceConfig<>();
- serviceConfig.setInterface(GreetingsService.class);
- serviceConfig.setRef(new GreetingsServiceImpl());
- serviceConfig.setApplication(new ApplicationConfig("provider"));
- serviceConfig.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181?enable-empty-protection=true"));
- serviceConfig.export();
-
- ReferenceConfig<GreetingsService> referenceConfig = new ReferenceConfig<>();
- referenceConfig.setInterface(GreetingsService.class);
- referenceConfig.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181?enable-empty-protection=true"));
- referenceConfig.setScope("remote");
- GreetingsService greetingsService = referenceConfig.get();
-
- Assert.assertEquals("hi, dubbo", greetingsService.sayHi("dubbo"));
-
- new Offline(FrameworkModel.defaultModel()).offline("org.apache.dubbo.samples.api.GreetingsService");
- Thread.sleep(1000);
-
- Assert.assertEquals("hi, dubbo", greetingsService.sayHi("dubbo"));
- }
-}
diff --git a/99-integration/dubbo-samples-hibernate/README.md b/99-integration/dubbo-samples-hibernate/README.md
deleted file mode 100644
index c3cdd1bcd..000000000
--- a/99-integration/dubbo-samples-hibernate/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Dubbo + Hibernate
-
-This is a dubbo + spring boot + hibernate sample.
-
-Please aware that dubbo doesn't require
-special hibernate version, but spring and hibernate does have some version requirement. So please make sure you are
-using right version in your own project.
-
diff --git a/99-integration/dubbo-samples-hibernate/case-configuration.yml b/99-integration/dubbo-samples-hibernate/case-configuration.yml
deleted file mode 100644
index 693210d83..000000000
--- a/99-integration/dubbo-samples-hibernate/case-configuration.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-services:
- zookeeper:
- image: zookeeper:latest
-
- dubbo-samples-spring-boot-hibernate-provider:
- type: app
- basedir: dubbo-samples-spring-boot-hibernate-provider
- mainClass: org.apache.dubbo.springboot.hibernate.samples.HibernateProviderApplication
- systemProps:
- - zookeeper.address=zookeeper
- waitPortsBeforeRun:
- - zookeeper:2181
- checkPorts:
- - 20880
- checkLog: "dubbo service started"
- depends_on:
- - zookeeper
-
- dubbo-samples-spring-boot-hibernate-consumer:
- type: test
- basedir: dubbo-samples-spring-boot-hibernate-consumer
- tests:
- - "**/*IT.class"
- systemProps:
- - zookeeper.address=zookeeper
- waitPortsBeforeRun:
- - zookeeper:2181
- - dubbo-samples-spring-boot-hibernate-provider:20880
- depends_on:
- - zookeeper
- - dubbo-samples-spring-boot-hibernate-provider
-
diff --git a/99-integration/dubbo-samples-hibernate/case-versions.conf b/99-integration/dubbo-samples-hibernate/case-versions.conf
deleted file mode 100644
index 795d1a492..000000000
--- a/99-integration/dubbo-samples-hibernate/case-versions.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# SpringBoot app
-dubbo.version=2.7*, 3.1*
-spring-boot.version=2.*
-java.version= [>= 8]
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-api/pom.xml b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-api/pom.xml
deleted file mode 100644
index 700823c41..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-api/pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>dubbo-samples-hibernate</artifactId>
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-samples-spring-boot-hibernate-api</artifactId>
-
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-</project>
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-api/src/main/java/org/apache/dubbo/springboot/hibernate/samples/HibernateService.java b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-api/src/main/java/org/apache/dubbo/springboot/hibernate/samples/HibernateService.java
deleted file mode 100644
index 98ffe06d5..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-api/src/main/java/org/apache/dubbo/springboot/hibernate/samples/HibernateService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.springboot.hibernate.samples;
-
-import java.util.List;
-
-public interface HibernateService {
- List<User> findAll();
-}
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-api/src/main/java/org/apache/dubbo/springboot/hibernate/samples/User.java b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-api/src/main/java/org/apache/dubbo/springboot/hibernate/samples/User.java
deleted file mode 100644
index 371437ccb..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-api/src/main/java/org/apache/dubbo/springboot/hibernate/samples/User.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.springboot.hibernate.samples;
-
-import lombok.Data;
-
-@Data
-public class User implements java.io.Serializable {
- private Long id;
- private String name;
-}
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/pom.xml b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/pom.xml
deleted file mode 100644
index 57e873451..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>dubbo-samples-hibernate</artifactId>
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-samples-spring-boot-hibernate-consumer</artifactId>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-samples-spring-boot-hibernate-api</artifactId>
- <version>${project.parent.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-test</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/main/java/org/apache/dubbo/springboot/hibernate/samples/HibernateConsumerApplication.java b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/main/java/org/apache/dubbo/springboot/hibernate/samples/HibernateConsumerApplication.java
deleted file mode 100644
index 94fbbcaaa..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/main/java/org/apache/dubbo/springboot/hibernate/samples/HibernateConsumerApplication.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-package org.apache.dubbo.springboot.hibernate.samples;
-
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-@EnableDubbo
-@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})
-public class HibernateConsumerApplication {
-
- @DubboReference
- private HibernateService hibernateService;
-
- public static void main(String[] args) {
- ConfigurableApplicationContext context = SpringApplication.run(HibernateConsumerApplication.class, args);
- HibernateConsumerApplication application = context.getBean(HibernateConsumerApplication.class);
- List<User> userList = application.findAll();
- System.out.println("result: " + userList);
- }
-
- public List<User> findAll() {
- return hibernateService.findAll();
- }
-}
-
-
-
-
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/main/resources/application.yml b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/main/resources/application.yml
deleted file mode 100644
index 346a891d0..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/main/resources/application.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-dubbo:
- application:
- name: dubbo-samples-spring-boot-hibernate-consumer
- protocol:
- name: dubbo
- port: 20081
- registry:
- id: zk-registry
- address: zookeeper://${zookeeper.address:127.0.0.1}:2181
- config-center:
- address: zookeeper://${zookeeper.address:127.0.0.1}:2181
- metadata-report:
- address: zookeeper://${zookeeper.address:127.0.0.1}:2181
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/main/resources/log4j2.xml b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/main/resources/log4j2.xml
deleted file mode 100644
index 69e1321d2..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT" follow="true">
- <PatternLayout pattern="%style{%d{HH:mm:ss.SSS}}{Magenta} %style{|-}{White}%highlight{%-5p} [%t] %style{%40.40c}{Cyan}:%style{%-3L}{Blue} %style{-|}{White} %m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect)}" disableAnsi="false" charset="UTF-8"/>
- </Console>
- </Appenders>
- <Loggers>
- <Root level="info">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/test/java/org/apache/dubbo/springboot/hibernate/samples/HibernateIT.java b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/test/java/org/apache/dubbo/springboot/hibernate/samples/HibernateIT.java
deleted file mode 100644
index 521d86c40..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-consumer/src/test/java/org/apache/dubbo/springboot/hibernate/samples/HibernateIT.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.springboot.hibernate.samples;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-import java.util.List;
-
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = {HibernateConsumerApplication.class})
-public class HibernateIT {
- @Autowired
- private HibernateConsumerApplication consumerApplication;
-
- @Test
- public void test() throws Exception {
- List<User> users = consumerApplication.findAll();
- Assert.assertEquals(1, users.size());
- }
-}
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/pom.xml b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/pom.xml
deleted file mode 100644
index 0fad957be..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>dubbo-samples-hibernate</artifactId>
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-samples-spring-boot-hibernate-provider</artifactId>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-samples-spring-boot-hibernate-api</artifactId>
- <version>${project.parent.version}</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <version>2.2.220</version>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>druid</artifactId>
- <version>1.2.6</version>
- </dependency>
-
- <dependency>
- <groupId>org.liquibase</groupId>
- <artifactId>liquibase-core</artifactId>
- <version>4.4.0</version>
- </dependency>
-
- <!-- Embedded Zookeeper Server Dependencies -->
- <dependency>
- <groupId>io.dropwizard.metrics</groupId>
- <artifactId>metrics-core</artifactId>
- <version>4.1.12.1</version>
- </dependency>
- <dependency>
- <groupId>org.xerial.snappy</groupId>
- <artifactId>snappy-java</artifactId>
- <version>1.1.10.5</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/EmbeddedZooKeeper.java b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/EmbeddedZooKeeper.java
deleted file mode 100644
index 4d3e5b8f4..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/EmbeddedZooKeeper.java
+++ /dev/null
@@ -1,309 +0,0 @@
-
-/*
- * Copyright 2014 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.springboot.hibernate.samples;
-
-import org.apache.zookeeper.server.ServerConfig;
-import org.apache.zookeeper.server.ZooKeeperServerMain;
-import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.SmartLifecycle;
-import org.springframework.util.ErrorHandler;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.ServerSocket;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-import java.util.UUID;
-import java.util.stream.Collectors;
-
-/**
- * from: https://github.com/spring-projects/spring-xd/blob/v1.3.1.RELEASE/spring-xd-dirt/src/main/java/org/springframework/xd/dirt/zookeeper/ZooKeeperUtils.java
- * <p>
- * Helper class to start an embedded instance of standalone (non clustered) ZooKeeper.
- * <p>
- * NOTE: at least an external standalone server (if not an ensemble) are recommended, even for
- * {@link org.springframework.xd.dirt.server.singlenode.SingleNodeApplication}
- *
- * @author Patrick Peralta
- * @author Mark Fisher
- * @author David Turanski
- */
-public class EmbeddedZooKeeper implements SmartLifecycle {
-
- private static final Random RANDOM = new Random();
-
- /**
- * Logger.
- */
- private static final Logger logger = LoggerFactory.getLogger(EmbeddedZooKeeper.class);
-
- /**
- * ZooKeeper client port. This will be determined dynamically upon startup.
- */
- private final int clientPort;
-
- /**
- * Whether to auto-start. Default is true.
- */
- private boolean autoStartup = true;
-
- /**
- * Lifecycle phase. Default is 0.
- */
- private int phase = 0;
-
- /**
- * Thread for running the ZooKeeper server.
- */
- private volatile Thread zkServerThread;
-
- /**
- * ZooKeeper server.
- */
- private volatile ZooKeeperServerMain zkServer;
-
- /**
- * {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread.
- */
- private ErrorHandler errorHandler;
-
- private boolean daemon = true;
-
- /**
- * Construct an EmbeddedZooKeeper with a random port.
- */
- public EmbeddedZooKeeper() {
- clientPort = findRandomPort(30000, 65535);
- }
-
- /**
- * Construct an EmbeddedZooKeeper with the provided port.
- *
- * @param clientPort port for ZooKeeper server to bind to
- */
- public EmbeddedZooKeeper(int clientPort, boolean daemon) {
- this.clientPort = clientPort;
- this.daemon = daemon;
- }
-
- /**
- * Returns the port that clients should use to connect to this embedded server.
- *
- * @return dynamically determined client port
- */
- public int getClientPort() {
- return this.clientPort;
- }
-
- /**
- * Specify whether to start automatically. Default is true.
- *
- * @param autoStartup whether to start automatically
- */
- public void setAutoStartup(boolean autoStartup) {
- this.autoStartup = autoStartup;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAutoStartup() {
- return this.autoStartup;
- }
-
- /**
- * Specify the lifecycle phase for the embedded server.
- *
- * @param phase the lifecycle phase
- */
- public void setPhase(int phase) {
- this.phase = phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getPhase() {
- return this.phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isRunning() {
- return (zkServerThread != null);
- }
-
- /**
- * Start the ZooKeeper server in a background thread.
- * <p>
- * Register an error handler via {@link #setErrorHandler} in order to handle
- * any exceptions thrown during startup or execution.
- */
- @Override
- public synchronized void start() {
- if (zkServerThread == null) {
- zkServerThread = new Thread(new ServerRunnable(), "ZooKeeper Server Starter");
- zkServerThread.setDaemon(daemon);
- zkServerThread.start();
- }
- }
-
- /**
- * Shutdown the ZooKeeper server.
- */
- @Override
- public synchronized void stop() {
- if (zkServerThread != null) {
- // The shutdown method is protected...thus this hack to invoke it.
- // This will log an exception on shutdown; see
- // https://issues.apache.org/jira/browse/ZOOKEEPER-1873 for details.
- try {
- Method shutdown = ZooKeeperServerMain.class.getDeclaredMethod("shutdown");
- shutdown.setAccessible(true);
- shutdown.invoke(zkServer);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- // It is expected that the thread will exit after
- // the server is shutdown; this will block until
- // the shutdown is complete.
- try {
- zkServerThread.join(5000);
- zkServerThread = null;
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- logger.warn("Interrupted while waiting for embedded ZooKeeper to exit");
- // abandoning zk thread
- zkServerThread = null;
- }
- }
- }
-
- /**
- * Stop the server if running and invoke the callback when complete.
- */
- @Override
- public void stop(Runnable callback) {
- stop();
- callback.run();
- }
-
- /**
- * Provide an {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread. If none
- * is provided, only error-level logging will occur.
- *
- * @param errorHandler the {@link ErrorHandler} to be invoked
- */
- public void setErrorHandler(ErrorHandler errorHandler) {
- this.errorHandler = errorHandler;
- }
-
- /**
- * Runnable implementation that starts the ZooKeeper server.
- */
- private class ServerRunnable implements Runnable {
-
- @Override
- public void run() {
- try {
- Properties properties = new Properties();
- File file = new File(System.getProperty("java.io.tmpdir")
- + File.separator + UUID.randomUUID());
- file.deleteOnExit();
- properties.setProperty("dataDir", file.getAbsolutePath());
- properties.setProperty("clientPort", String.valueOf(clientPort));
-
- QuorumPeerConfig quorumPeerConfig = new QuorumPeerConfig();
- quorumPeerConfig.parseProperties(properties);
-
- zkServer = new ZooKeeperServerMain();
- ServerConfig configuration = new ServerConfig();
- configuration.readFrom(quorumPeerConfig);
-
- System.setProperty("zookeeper.admin.enableServer", "false");
-
- zkServer.runFromConfig(configuration);
- } catch (Exception e) {
- if (errorHandler != null) {
- errorHandler.handleError(e);
- } else {
- logger.error("Exception running embedded ZooKeeper", e);
- }
- }
- }
- }
-
- /**
- * Workaround for SocketUtils.findRandomPort() deprecation.
- *
- * @param min min port
- * @param max max port
- * @return a random generated available port
- */
- private static int findRandomPort(int min, int max) {
- if (min < 1024) {
- throw new IllegalArgumentException("Max port shouldn't be less than 1024.");
- }
-
- if (max > 65535) {
- throw new IllegalArgumentException("Max port shouldn't be greater than 65535.");
- }
-
- if (min > max) {
- throw new IllegalArgumentException("Min port shouldn't be greater than max port.");
- }
-
- int port = 0;
- int counter = 0;
-
- // Workaround for legacy JDK doesn't support Random.nextInt(min, max).
- List<Integer> randomInts = RANDOM.ints(min, max + 1)
- .limit(max - min)
- .mapToObj(Integer::valueOf)
- .collect(Collectors.toList());
-
- do {
- if (counter > max - min) {
- throw new IllegalStateException("Unable to find a port between " + min + "-" + max);
- }
-
- port = randomInts.get(counter);
- counter++;
- } while (isPortInUse(port));
-
- return port;
- }
-
- private static boolean isPortInUse(int port) {
- try (ServerSocket ignored = new ServerSocket(port)) {
- return false;
- } catch (IOException e) {
- // continue
- }
- return true;
- }
-}
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/HibernateProviderApplication.java b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/HibernateProviderApplication.java
deleted file mode 100644
index d0cf3ba6d..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/HibernateProviderApplication.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.springboot.hibernate.samples;
-
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-
-@EnableDubbo
-@SpringBootApplication
-public class HibernateProviderApplication {
-
- public static void main(String[] args) throws Exception {
- new EmbeddedZooKeeper(2181, false).start();
- SpringApplication.run(HibernateProviderApplication.class, args);
- System.out.println("dubbo service started");
- }
-}
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/impl/HibernateServiceImpl.java b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/impl/HibernateServiceImpl.java
deleted file mode 100644
index 8debb65b3..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/impl/HibernateServiceImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Copyright 2014 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.springboot.hibernate.samples.impl;
-
-import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.springboot.hibernate.samples.HibernateService;
-import org.apache.dubbo.springboot.hibernate.samples.User;
-import org.apache.dubbo.springboot.hibernate.samples.repository.UserRepository;
-import org.apache.dubbo.springboot.hibernate.samples.repository.UserModel;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-@Service
-@DubboService
-public class HibernateServiceImpl implements HibernateService {
- @Autowired
- private UserRepository userRepository;
-
- @Override
- public List<User> findAll() {
- UserModel userModel = new UserModel();
- userModel.setId(1L);
- userModel.setName("apache dubbo");
- userRepository.saveAndFlush(userModel);
-
- List<UserModel> userModels = userRepository.findAll();
- return userModels.stream().map(u -> {
- User user = new User();
- user.setId(u.getId());
- user.setName(u.getName());
- return user;
- }).collect(Collectors.toList());
- }
-}
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/repository/UserModel.java b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/repository/UserModel.java
deleted file mode 100644
index 98049ca01..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/repository/UserModel.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.springboot.hibernate.samples.repository;
-
-import lombok.Data;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Data
-@Entity
-@Table(name = "user")
-public class UserModel {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Long id;
- @Column(name = "name", nullable = false)
- private String name;
-}
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/repository/UserRepository.java b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/repository/UserRepository.java
deleted file mode 100644
index 8f4b8bc96..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/java/org/apache/dubbo/springboot/hibernate/samples/repository/UserRepository.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.springboot.hibernate.samples.repository;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface UserRepository extends JpaRepository<UserModel, Long> {
-
-}
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/resources/application.yml b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/resources/application.yml
deleted file mode 100644
index 7baf88381..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/resources/application.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-dubbo:
- application:
- name: dubbo-samples-spring-boot-hibernate-provider
- protocol:
- name: dubbo
- port: 20880
- registry:
- id: zk-registry
- address: zookeeper://${zookeeper.address:127.0.0.1}:2181
- config-center:
- address: zookeeper://${zookeeper.address:127.0.0.1}:2181
- metadata-report:
- address: zookeeper://${zookeeper.address:127.0.0.1}:2181
- scan:
- base-packages: org.apache.dubbo.springboot.hibernate.samples
-
-spring:
- liquibase:
- change-log: liquibase/liquibase-changelog.xml
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- driver-class-name: org.h2.Driver
- url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;MODE=Oracle;TRACE_LEVEL_SYSTEM_OUT=2;DATABASE_TO_LOWER=TRUE
\ No newline at end of file
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/resources/liquibase/liquibase-changelog.xml b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/resources/liquibase/liquibase-changelog.xml
deleted file mode 100644
index e3b496fbb..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/resources/liquibase/liquibase-changelog.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
- http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">
-
- <changeSet id="init table" author="htynkn">
- <createTable tableName="user">
- <column name="id" type="long" autoIncrement="true">
- <constraints primaryKey="true" nullable="false"/>
- </column>
- <column name="name" type="varchar(50)"/>
- </createTable>
- </changeSet>
-</databaseChangeLog>
diff --git a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/resources/log4j2.xml b/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/resources/log4j2.xml
deleted file mode 100644
index 69e1321d2..000000000
--- a/99-integration/dubbo-samples-hibernate/dubbo-samples-spring-boot-hibernate-provider/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT" follow="true">
- <PatternLayout pattern="%style{%d{HH:mm:ss.SSS}}{Magenta} %style{|-}{White}%highlight{%-5p} [%t] %style{%40.40c}{Cyan}:%style{%-3L}{Blue} %style{-|}{White} %m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect)}" disableAnsi="false" charset="UTF-8"/>
- </Console>
- </Appenders>
- <Loggers>
- <Root level="info">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
diff --git a/99-integration/dubbo-samples-hibernate/pom.xml b/99-integration/dubbo-samples-hibernate/pom.xml
deleted file mode 100644
index e242af057..000000000
--- a/99-integration/dubbo-samples-hibernate/pom.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
--->
-
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <packaging>pom</packaging>
- <modules>
- <module>dubbo-samples-spring-boot-hibernate-api</module>
- <module>dubbo-samples-spring-boot-hibernate-provider</module>
- <module>dubbo-samples-spring-boot-hibernate-consumer</module>
- </modules>
- <parent>
- <groupId>org.apache</groupId>
- <artifactId>apache</artifactId>
- <version>23</version>
- <relativePath/>
- </parent>
-
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-samples-hibernate</artifactId>
- <version>1.0-SNAPSHOT</version>
- <name>Dubbo Samples Hibernate</name>
- <description>Dubbo Samples Hibernate</description>
-
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <dubbo.version>3.2.6</dubbo.version>
- <spring.version>4.3.30.RELEASE</spring.version>
- <spring-boot.version>2.7.8</spring-boot.version>
- <junit.version>4.13.1</junit.version>
-
- <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${spring-boot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <artifactId>logback-classic</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>logback-core</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
- <exclusions>
- <exclusion>
- <artifactId>spring-boot-starter-logging</artifactId>
- <groupId>org.springframework.boot</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-log4j2</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-spring-boot-starter</artifactId>
- <version>${dubbo.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <type>pom</type>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- <version>1.18.30</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- </dependencies>
-
- <profiles>
- <!-- For jdk 11 above JavaEE annotation -->
- <profile>
- <id>javax.annotation</id>
- <activation>
- <jdk>[1.11,)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <version>1.3.2</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler-plugin.version}</version>
- </plugin>
- <plugin>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok-maven-plugin</artifactId>
- <version>1.18.20.0</version>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>delombok</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/99-integration/dubbo-samples-isolation-executor/README.md b/99-integration/dubbo-samples-isolation-executor/README.md
deleted file mode 100644
index c312b4670..000000000
--- a/99-integration/dubbo-samples-isolation-executor/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-There are three ways to configure the isolated thread pool: API, Spring-Annotation and Spring-XML.
-
-The entry for the three configuration cases is: ApiIsolationTest, AnnotationIsolationTest, XmlIsolationTest.
\ No newline at end of file
diff --git a/99-integration/dubbo-samples-isolation-executor/case-configuration.yml b/99-integration/dubbo-samples-isolation-executor/case-configuration.yml
deleted file mode 100644
index 942e6a0d9..000000000
--- a/99-integration/dubbo-samples-isolation-executor/case-configuration.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-services:
- zookeeper:
- image: zookeeper:latest
-
- dubbo-samples-isolation-executor-test:
- type: test
- basedir: .
- tests:
- - "**/*IT.class"
- systemProps:
- - zookeeper.address=zookeeper
- waitPortsBeforeRun:
- - zookeeper:2181
- depends_on:
- - zookeeper
\ No newline at end of file
diff --git a/99-integration/dubbo-samples-isolation-executor/case-versions.conf b/99-integration/dubbo-samples-isolation-executor/case-versions.conf
deleted file mode 100644
index e2baf7bda..000000000
--- a/99-integration/dubbo-samples-isolation-executor/case-versions.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# Spring app
-dubbo.version=[ >=3.2.0 ]
-spring.version=4.*, 5.*
-java.version= [>= 8]
diff --git a/99-integration/dubbo-samples-isolation-executor/pom.xml b/99-integration/dubbo-samples-isolation-executor/pom.xml
deleted file mode 100644
index 92aecd982..000000000
--- a/99-integration/dubbo-samples-isolation-executor/pom.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-samples-isolation-executor</artifactId>
- <version>1.0-SNAPSHOT</version>
-
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <dubbo.version>3.2.6</dubbo.version>
- <log4j2.version>2.20.0</log4j2.version>
- <junit.version>4.13.1</junit.version>
-
- <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <artifactId>logback-classic</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>logback-core</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-rpc-triple</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <type>pom</type>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-common</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler-plugin.version}</version>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/99-integration/dubbo-samples-isolation-executor/src/main/java/org/apache/dubbo/samples/Application.java b/99-integration/dubbo-samples-isolation-executor/src/main/java/org/apache/dubbo/samples/Application.java
deleted file mode 100644
index e1413abb4..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/main/java/org/apache/dubbo/samples/Application.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples;
-
-public class Application {
- public static void main(String[] args) {
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/api/ApiIsolationIT.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/api/ApiIsolationIT.java
deleted file mode 100644
index 8d891e986..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/api/ApiIsolationIT.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.api;
-
-import org.apache.dubbo.common.threadlocal.NamedInternalThreadFactory;
-import org.apache.dubbo.common.threadpool.manager.ExecutorRepository;
-import org.apache.dubbo.common.threadpool.manager.IsolationExecutorRepository;
-import org.apache.dubbo.common.utils.NamedThreadFactory;
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ProtocolConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.config.bootstrap.DubboBootstrap;
-import org.apache.dubbo.config.bootstrap.builders.ReferenceBuilder;
-import org.apache.dubbo.rpc.Protocol;
-import org.apache.dubbo.rpc.model.ApplicationModel;
-import org.apache.dubbo.rpc.model.FrameworkModel;
-import org.apache.dubbo.samples.support.DemoService;
-import org.apache.dubbo.samples.support.DemoServiceImpl;
-import org.apache.dubbo.samples.support.HelloService;
-import org.apache.dubbo.samples.support.HelloServiceImpl;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.function.Consumer;
-
-import static org.apache.dubbo.common.constants.CommonConstants.EXECUTOR_MANAGEMENT_MODE_ISOLATION;
-
-public class ApiIsolationIT {
-
- private static final String version1 = "1.0";
- private static final String version2 = "2.0";
- private static final String version3 = "3.0";
-
- @Test
- public void test() {
- String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
- RegistryConfig registryConfig = new RegistryConfig("zookeeper://" + zookeeperHost + ":2181");
-
- DubboBootstrap providerBootstrap = null;
- DubboBootstrap consumerBootstrap1 = null;
- DubboBootstrap consumerBootstrap2 = null;
-
- try {
-
- // provider app
- providerBootstrap = DubboBootstrap.newInstance();
-
- ServiceConfig serviceConfig1 = new ServiceConfig();
- serviceConfig1.setInterface(DemoService.class);
- serviceConfig1.setRef(new DemoServiceImpl());
- serviceConfig1.setVersion(version1);
- // set executor1 for serviceConfig1, max threads is 10
- NamedThreadFactory threadFactory1 = new NamedThreadFactory("DemoServiceExecutor");
- ExecutorService executor1 = Executors.newFixedThreadPool(10, threadFactory1);
- serviceConfig1.setExecutor(executor1);
-
- ServiceConfig serviceConfig2 = new ServiceConfig();
- serviceConfig2.setInterface(HelloService.class);
- serviceConfig2.setRef(new HelloServiceImpl());
- serviceConfig2.setVersion(version2);
- // set executor2 for serviceConfig2, max threads is 100
- NamedThreadFactory threadFactory2 = new NamedThreadFactory("HelloServiceExecutor");
- ExecutorService executor2 = Executors.newFixedThreadPool(100, threadFactory2);
- serviceConfig2.setExecutor(executor2);
-
- ServiceConfig serviceConfig3 = new ServiceConfig();
- serviceConfig3.setInterface(HelloService.class);
- serviceConfig3.setRef(new HelloServiceImpl());
- serviceConfig3.setVersion(version3);
- // Because executor is not set for serviceConfig3, the default executor of serviceConfig3 is built using
- // the threadpool parameter of the protocolConfig ( FixedThreadpool , max threads is 200)
- serviceConfig3.setExecutor(null);
-
- // It takes effect only if [executor-management-mode=isolation] is configured
- ApplicationConfig applicationConfig = new ApplicationConfig("provider-app");
- applicationConfig.setExecutorManagementMode(EXECUTOR_MANAGEMENT_MODE_ISOLATION);
-
- providerBootstrap
- .application(applicationConfig)
- .registry(registryConfig)
- // export with tri and dubbo protocol
- .protocol(new ProtocolConfig("tri", 20001))
- .protocol(new ProtocolConfig("dubbo", 20002))
- .service(serviceConfig1)
- .service(serviceConfig2)
- .service(serviceConfig3);
-
- providerBootstrap.start();
-
- // Verify that the executor is the previously configured
- ApplicationModel applicationModel = providerBootstrap.getApplicationModel();
- ExecutorRepository repository = ExecutorRepository.getInstance(applicationModel);
- assert repository instanceof IsolationExecutorRepository;
- assert executor1.equals(repository.getExecutor(serviceConfig1.toUrl()));
- assert executor2.equals(repository.getExecutor(serviceConfig2.toUrl()));
- // the default executor of serviceConfig3 is built using the threadpool parameter of the protocol
- ThreadPoolExecutor executor3 = (ThreadPoolExecutor) repository.getExecutor(serviceConfig3.toUrl());
- assert executor3.getThreadFactory() instanceof NamedInternalThreadFactory;
- NamedInternalThreadFactory threadFactory3 = (NamedInternalThreadFactory) executor3.getThreadFactory();
-
- // consumer app start with dubbo protocol and rpc call
- consumerBootstrap1 = configConsumerBootstrapWithProtocol("dubbo", registryConfig);
- rpcInvoke(consumerBootstrap1);
-
- // consumer app start with tri protocol and rpc call
- consumerBootstrap2 = configConsumerBootstrapWithProtocol("tri", registryConfig);
- rpcInvoke(consumerBootstrap2);
-
- // Verify that when the provider accepts different service requests,
- // whether to use the respective executor(threadFactory) of different services to create threads
- AtomicInteger threadNum1 = threadFactory1.getThreadNum();
- AtomicInteger threadNum2 = threadFactory2.getThreadNum();
- AtomicInteger threadNum3 = threadFactory3.getThreadNum();
- assert threadNum1.get() == 11;
- assert threadNum2.get() == 101;
- assert threadNum3.get() == 201;
-
- } finally {
- if (consumerBootstrap1 != null) {
- consumerBootstrap1.destroy();
- }
- if (consumerBootstrap2 != null) {
- consumerBootstrap2.destroy();
- }
- if (providerBootstrap != null) {
- providerBootstrap.destroy();
- }
- FrameworkModel.destroyAll();
- }
- }
-
-
- private static void rpcInvoke(DubboBootstrap consumerBootstrap) {
- DemoService demoServiceV1 = consumerBootstrap.getCache().get(DemoService.class.getName() + ":" + version1);
- HelloService helloServiceV2 = consumerBootstrap.getCache().get(HelloService.class.getName() + ":" + version2);
- HelloService helloServiceV3 = consumerBootstrap.getCache().get(HelloService.class.getName() + ":" + version3);
- for (int i = 0; i < 250; i++) {
- String invocation = "hello, version = " + version1;
- String response = demoServiceV1.sayName(invocation);
- Assert.assertTrue(response.startsWith("say: " + invocation + " from DemoServiceExecutor"));
- }
- for (int i = 0; i < 250; i++) {
- String invocation = "hello, version = " + version2;
- String response = helloServiceV2.sayHello(invocation);
- Assert.assertTrue(response.startsWith("Hello, " + invocation + " from HelloServiceExecutor"));
- }
- for (int i = 0; i < 250; i++) {
- String invocation = "hello, version = " + version3;
- String response = helloServiceV3.sayHello(invocation);
- Assert.assertTrue(response.startsWith("Hello, " + invocation + " from DubboServerHandler"));
- }
- }
-
- private static DubboBootstrap configConsumerBootstrapWithProtocol(String protocol, RegistryConfig registryConfig) {
- DubboBootstrap consumerBootstrap;
- consumerBootstrap = DubboBootstrap.newInstance();
- consumerBootstrap.application("consumer-app")
- .registry(registryConfig)
- .reference(generateReferenceConsumer(DemoService.class, version1, protocol))
- .reference(generateReferenceConsumer(HelloService.class, version2, protocol))
- .reference(generateReferenceConsumer(HelloService.class, version3, protocol));
- consumerBootstrap.start();
- return consumerBootstrap;
- }
-
- private static <S> Consumer<ReferenceBuilder<S>> generateReferenceConsumer(Class interfaceClass, String versionNumber, String protocol) {
- return builder -> builder.interfaceClass(interfaceClass)
- .version(versionNumber)
- .protocol(protocol)
- .scope("remote");
- }
-
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/BaseTest.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/BaseTest.java
deleted file mode 100644
index 589e996ce..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/BaseTest.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring;
-
-import org.apache.dubbo.common.threadlocal.NamedInternalThreadFactory;
-import org.apache.dubbo.common.threadpool.manager.ExecutorRepository;
-import org.apache.dubbo.common.threadpool.manager.IsolationExecutorRepository;
-import org.apache.dubbo.common.utils.NamedThreadFactory;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.rpc.model.ApplicationModel;
-import org.apache.dubbo.samples.spring.support.DemoServiceExecutor;
-import org.apache.dubbo.samples.spring.support.HelloServiceExecutor;
-import org.apache.dubbo.samples.support.DemoService;
-import org.apache.dubbo.samples.support.HelloService;
-
-import org.junit.Assert;
-import org.springframework.context.ApplicationContext;
-
-import java.util.Map;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.atomic.AtomicInteger;
-
-public abstract class BaseTest {
-
- protected ServiceConfig serviceConfig1;
- protected ServiceConfig serviceConfig2;
- protected ServiceConfig serviceConfig3;
-
- protected void assertExecutor(ApplicationContext providerContext, ApplicationContext consumerContext) {
-
- // find configured "executor-demo-service" executor
- Map<String, DemoServiceExecutor> beansOfType1 = providerContext.getBeansOfType(DemoServiceExecutor.class);
- ThreadPoolExecutor executor1 = beansOfType1.get("executor-demo-service");
- NamedThreadFactory threadFactory1 = (NamedThreadFactory) executor1.getThreadFactory();
-
- // find configured "executor-hello-service" executor
- Map<String, HelloServiceExecutor> beansOfType2 = providerContext.getBeansOfType(HelloServiceExecutor.class);
- ThreadPoolExecutor executor2 = beansOfType2.get("executor-hello-service");
- NamedThreadFactory threadFactory2 = (NamedThreadFactory) executor2.getThreadFactory();
-
- // Verify that the executor is the previously configured
- Map<String, ApplicationModel> applicationModelMap = providerContext.getBeansOfType(ApplicationModel.class);
- ApplicationModel applicationModel = applicationModelMap.get(ApplicationModel.class.getName());
- ExecutorRepository repository = ExecutorRepository.getInstance(applicationModel);
- assert repository instanceof IsolationExecutorRepository;
- assert executor1.equals(repository.getExecutor(serviceConfig1.toUrl()));
- assert executor2.equals(repository.getExecutor(serviceConfig2.toUrl()));
- // the default executor of serviceConfig3 is built using the threadpool parameter of the protocol
- ThreadPoolExecutor executor3 = (ThreadPoolExecutor) repository.getExecutor(serviceConfig3.toUrl());
- assert executor3.getThreadFactory() instanceof NamedInternalThreadFactory;
- NamedInternalThreadFactory threadFactory3 = (NamedInternalThreadFactory) executor3.getThreadFactory();
-
- // rpc invoke with dubbo protocol
- DemoService demoServiceV1 = consumerContext.getBean("dubbo-demoServiceV1", DemoService.class);
- HelloService helloServiceV2 = consumerContext.getBean("dubbo-helloServiceV2", HelloService.class);
- HelloService helloServiceV3 = consumerContext.getBean("dubbo-helloServiceV3", HelloService.class);
- rpcInvoke(demoServiceV1, helloServiceV2, helloServiceV3);
-
- // rpc invoke with tri protocol
- demoServiceV1 = consumerContext.getBean("tri-demoServiceV1", DemoService.class);
- helloServiceV2 = consumerContext.getBean("tri-helloServiceV2", HelloService.class);
- helloServiceV3 = consumerContext.getBean("tri-helloServiceV3", HelloService.class);
- rpcInvoke(demoServiceV1, helloServiceV2, helloServiceV3);
-
- // Verify that when the provider accepts different service requests,
- // whether to use the respective executor(threadFactory) of different services to create threads
- AtomicInteger threadNum1 = threadFactory1.getThreadNum();
- AtomicInteger threadNum2 = threadFactory2.getThreadNum();
- AtomicInteger threadNum3 = threadFactory3.getThreadNum();
- assert threadNum1.get() == 11;
- assert threadNum2.get() == 101;
- assert threadNum3.get() == 201;
- }
-
- private void rpcInvoke(DemoService demoServiceV1, HelloService helloServiceV2, HelloService helloServiceV3) {
- for (int i = 0; i < 250; i++) {
- String response = demoServiceV1.sayName("name");
- Assert.assertTrue(response.startsWith("say: name from DemoServiceExecutor"));
- }
- for (int i = 0; i < 250; i++) {
- String response = helloServiceV2.sayHello("hello");
- Assert.assertTrue(response.startsWith("Hello, hello from HelloServiceExecutor"));
- }
- for (int i = 0; i < 250; i++) {
- String response = helloServiceV3.sayHello("hello");
- Assert.assertTrue(response.startsWith("Hello, hello from DubboServerHandler"));
- }
-
- }
-
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/AnnotationIsolationIT.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/AnnotationIsolationIT.java
deleted file mode 100644
index b5acaf8b4..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/AnnotationIsolationIT.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.annotation;
-
-import java.util.Map;
-import java.util.concurrent.Executor;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ProtocolConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.apache.dubbo.samples.spring.BaseTest;
-import org.apache.dubbo.samples.spring.support.DemoServiceExecutor;
-import org.apache.dubbo.samples.spring.support.HelloServiceExecutor;
-import org.junit.Test;
-import org.springframework.context.annotation.AnnotationConfigApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-
-import static org.apache.dubbo.common.constants.CommonConstants.EXECUTOR_MANAGEMENT_MODE_ISOLATION;
-
-public class AnnotationIsolationIT extends BaseTest {
-
- @Test
- public void test() {
- // start provider app
- AnnotationConfigApplicationContext providerContext = new AnnotationConfigApplicationContext(ProviderConfiguration.class);
- providerContext.start();
-
- // start consumer app
- AnnotationConfigApplicationContext consumerContext = new AnnotationConfigApplicationContext(ConsumerConfiguration.class);
- consumerContext.start();
-
- // getAndSet serviceConfig
- setServiceConfig(providerContext);
-
- // assert isolation of executor
- assertExecutor(providerContext, consumerContext);
-
- // close context
- consumerContext.close();
- providerContext.close();
-
- }
-
- private void setServiceConfig(AnnotationConfigApplicationContext providerContext) {
- Map<String, ServiceConfig> serviceConfigMap = providerContext.getBeansOfType(ServiceConfig.class);
- serviceConfig1 = serviceConfigMap.get("ServiceBean:org.apache.dubbo.samples.support.DemoService:1.0.0:Group1");
- serviceConfig2 = serviceConfigMap.get("ServiceBean:org.apache.dubbo.samples.support.HelloService:2.0.0:Group2");
- serviceConfig3 = serviceConfigMap.get("ServiceBean:org.apache.dubbo.samples.support.HelloService:3.0.0:Group3");
- }
-
- // note scanBasePackages, refer three service with dubbo and tri protocol
- @Configuration
- @EnableDubbo(scanBasePackages = "org.apache.dubbo.samples.spring.annotation.consumer")
- @ComponentScan(value = {"org.apache.dubbo.samples.spring.annotation.consumer"})
- static class ConsumerConfiguration {
- @Bean
- public RegistryConfig registryConfig() {
- RegistryConfig registryConfig = new RegistryConfig();
- String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
- registryConfig.setAddress("zookeeper://" + zookeeperHost + ":2181");
- return registryConfig;
- }
-
- @Bean
- public ApplicationConfig applicationConfig() {
- ApplicationConfig applicationConfig = new ApplicationConfig("consumer-app");
- return applicationConfig;
- }
- }
-
- // note scanBasePackages, expose three service with dubbo and tri protocol
- @Configuration
- @EnableDubbo(scanBasePackages = "org.apache.dubbo.samples.spring.annotation.provider")
- static class ProviderConfiguration {
- @Bean
- public RegistryConfig registryConfig() {
- RegistryConfig registryConfig = new RegistryConfig();
- String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
- registryConfig.setAddress("zookeeper://" + zookeeperHost + ":2181");
- return registryConfig;
- }
-
- // NOTE: we need config executor-management-mode="isolation"
- @Bean
- public ApplicationConfig applicationConfig() {
- ApplicationConfig applicationConfig = new ApplicationConfig("provider-app");
-
- applicationConfig.setExecutorManagementMode(EXECUTOR_MANAGEMENT_MODE_ISOLATION);
- return applicationConfig;
- }
-
- // expose services with dubbo protocol
- @Bean
- public ProtocolConfig dubbo() {
- ProtocolConfig protocolConfig = new ProtocolConfig("dubbo");
- return protocolConfig;
- }
-
- // expose services with tri protocol
- @Bean
- public ProtocolConfig tri() {
- ProtocolConfig protocolConfig = new ProtocolConfig("tri");
- return protocolConfig;
- }
-
- // customized thread pool
- @Bean("executor-demo-service")
- public Executor demoServiceExecutor() {
- return new DemoServiceExecutor();
- }
-
- // customized thread pool
- @Bean("executor-hello-service")
- public Executor helloServiceExecutor() {
- return new HelloServiceExecutor();
- }
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/dubbo/DemoServiceV1.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/dubbo/DemoServiceV1.java
deleted file mode 100644
index ec6d6bb1e..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/dubbo/DemoServiceV1.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.annotation.consumer.dubbo;
-
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.samples.support.DemoService;
-
-import org.springframework.stereotype.Component;
-
-@Component("dubbo-demoServiceV1")
-public class DemoServiceV1 implements DemoService {
- @DubboReference(version = "1.0.0", group = "Group1", scope = "remote", protocol = "dubbo")
- private DemoService demoService;
-
- @Override
- public String sayName(String name) {
- return demoService.sayName(name);
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/dubbo/HelloServiceV2.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/dubbo/HelloServiceV2.java
deleted file mode 100644
index 94b3e292f..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/dubbo/HelloServiceV2.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.annotation.consumer.dubbo;
-
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.samples.support.HelloService;
-
-import org.springframework.stereotype.Component;
-
-@Component("dubbo-helloServiceV2")
-public class HelloServiceV2 implements HelloService {
- @DubboReference(version = "2.0.0", group = "Group2", scope = "remote", protocol = "dubbo")
- private HelloService helloService;
-
- @Override
- public String sayHello(String name) {
- return helloService.sayHello(name);
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/dubbo/HelloServiceV3.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/dubbo/HelloServiceV3.java
deleted file mode 100644
index 004f41133..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/dubbo/HelloServiceV3.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.annotation.consumer.dubbo;
-
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.samples.support.HelloService;
-
-import org.springframework.stereotype.Component;
-
-@Component("dubbo-helloServiceV3")
-public class HelloServiceV3 implements HelloService {
- @DubboReference(version = "3.0.0", group = "Group3", scope = "remote", protocol = "dubbo")
- private HelloService helloService;
-
- @Override
- public String sayHello(String name) {
- return helloService.sayHello(name);
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/tri/DemoServiceV1.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/tri/DemoServiceV1.java
deleted file mode 100644
index 4c788f618..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/tri/DemoServiceV1.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.annotation.consumer.tri;
-
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.samples.support.DemoService;
-
-import org.springframework.stereotype.Component;
-
-@Component("tri-demoServiceV1")
-public class DemoServiceV1 implements DemoService {
- @DubboReference(version = "1.0.0",group = "Group1", scope = "remote", protocol = "tri")
- private DemoService demoService;
-
- @Override
- public String sayName(String name) {
- return demoService.sayName(name);
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/tri/HelloServiceV2.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/tri/HelloServiceV2.java
deleted file mode 100644
index 3ea04ea15..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/tri/HelloServiceV2.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.annotation.consumer.tri;
-
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.samples.support.HelloService;
-
-import org.springframework.stereotype.Component;
-
-@Component("tri-helloServiceV2")
-public class HelloServiceV2 implements HelloService {
- @DubboReference(version = "2.0.0", group = "Group2", scope = "remote", protocol = "tri")
- private HelloService helloService;
-
- @Override
- public String sayHello(String name) {
- return helloService.sayHello(name);
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/tri/HelloServiceV3.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/tri/HelloServiceV3.java
deleted file mode 100644
index 7d554b4ae..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/consumer/tri/HelloServiceV3.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.annotation.consumer.tri;
-
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.samples.support.HelloService;
-
-import org.springframework.stereotype.Component;
-
-@Component("tri-helloServiceV3")
-public class HelloServiceV3 implements HelloService {
- @DubboReference(version = "3.0.0", group = "Group3", scope = "remote", protocol = "tri")
- private HelloService helloService;
-
- @Override
- public String sayHello(String name) {
- return helloService.sayHello(name);
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/provider/DemoServiceImplV1.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/provider/DemoServiceImplV1.java
deleted file mode 100644
index 2e554f439..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/provider/DemoServiceImplV1.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.annotation.provider;
-
-import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.samples.support.DemoService;
-
-@DubboService(executor = "executor-demo-service", version = "1.0.0", group = "Group1")
-public class DemoServiceImplV1 implements DemoService {
- @Override
- public String sayName(String name) {
- return "say: " + name + " from " + Thread.currentThread().getName();
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/provider/HelloServiceImplV2.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/provider/HelloServiceImplV2.java
deleted file mode 100644
index 76074fccc..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/provider/HelloServiceImplV2.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.annotation.provider;
-
-import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.samples.support.HelloService;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@DubboService(version = "3.0.0", group = "Group3")
-public class HelloServiceImplV2 implements HelloService {
- private static final Logger logger = LoggerFactory.getLogger(HelloServiceImplV2.class);
-
- @Override
- public String sayHello(String name) {
- return "Hello, " + name + " from " + Thread.currentThread().getName();
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/provider/HelloServiceImplV3.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/provider/HelloServiceImplV3.java
deleted file mode 100644
index 584179f45..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/annotation/provider/HelloServiceImplV3.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.annotation.provider;
-
-import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.samples.support.HelloService;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@DubboService(executor = "executor-hello-service", version = "2.0.0", group = "Group2")
-public class HelloServiceImplV3 implements HelloService {
- private static final Logger logger = LoggerFactory.getLogger(HelloServiceImplV3.class);
-
- @Override
- public String sayHello(String name) {
- return "Hello, " + name + " from " + Thread.currentThread().getName();
- }
-
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/support/DemoServiceExecutor.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/support/DemoServiceExecutor.java
deleted file mode 100644
index b38d70bcb..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/support/DemoServiceExecutor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.support;
-
-import org.apache.dubbo.common.utils.NamedThreadFactory;
-
-import java.util.concurrent.LinkedBlockingDeque;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-public class DemoServiceExecutor extends ThreadPoolExecutor {
- public DemoServiceExecutor() {
- super(10, 10, 60, TimeUnit.SECONDS, new LinkedBlockingDeque<>(),
- new NamedThreadFactory("DemoServiceExecutor"));
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/support/HelloServiceExecutor.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/support/HelloServiceExecutor.java
deleted file mode 100644
index 9d9a86ce5..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/support/HelloServiceExecutor.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.support;
-
-import org.apache.dubbo.common.utils.NamedThreadFactory;
-
-import java.util.concurrent.LinkedBlockingDeque;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-public class HelloServiceExecutor extends ThreadPoolExecutor {
- public HelloServiceExecutor() {
- super(100, 100, 60, TimeUnit.SECONDS, new LinkedBlockingDeque<>(),
- new NamedThreadFactory("HelloServiceExecutor"));
- }
-
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/xml/XmlIsolationIT.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/xml/XmlIsolationIT.java
deleted file mode 100644
index 6b78e6b11..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/spring/xml/XmlIsolationIT.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.spring.xml;
-
-import java.util.Map;
-
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.samples.spring.BaseTest;
-import org.junit.Test;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class XmlIsolationIT extends BaseTest {
-
- @Test
- public void test() {
- // start provider app
- ClassPathXmlApplicationContext providerContext = new ClassPathXmlApplicationContext("META-INF/isolation/dubbo-provider.xml");
- providerContext.start();
-
- // start consumer app
- ClassPathXmlApplicationContext consumerContext = new ClassPathXmlApplicationContext("META-INF/isolation/dubbo-consumer.xml");
- consumerContext.start();
-
- // getAndSet serviceConfig
- setServiceConfig(providerContext);
-
- // assert isolation of executor
- assertExecutor(providerContext, consumerContext);
-
- // close context
- consumerContext.close();
- providerContext.close();
- }
-
- private void setServiceConfig(ClassPathXmlApplicationContext providerContext) {
- Map<String, ServiceConfig> serviceConfigMap = providerContext.getBeansOfType(ServiceConfig.class);
- serviceConfig1 = serviceConfigMap.get("org.apache.dubbo.config.spring.ServiceBean#0");
- serviceConfig2 = serviceConfigMap.get("org.apache.dubbo.config.spring.ServiceBean#1");
- serviceConfig3 = serviceConfigMap.get("org.apache.dubbo.config.spring.ServiceBean#2");
- }
-
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/DemoService.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/DemoService.java
deleted file mode 100644
index 5ea98c1a9..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/DemoService.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.support;
-
-public interface DemoService {
- String sayName(String name);
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/DemoServiceImpl.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/DemoServiceImpl.java
deleted file mode 100644
index 2174072a8..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/DemoServiceImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.support;
-
-public class DemoServiceImpl implements DemoService {
-
- private String prefix = "say: ";
-
- public String sayName(String name) {
- return prefix + name + " from " + Thread.currentThread().getName();
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/HelloService.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/HelloService.java
deleted file mode 100644
index 15aed4304..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/HelloService.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.support;
-
-public interface HelloService {
- String sayHello(String name);
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/HelloServiceImpl.java b/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/HelloServiceImpl.java
deleted file mode 100644
index 4e0e22fdf..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/java/org/apache/dubbo/samples/support/HelloServiceImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.support;
-
-public class HelloServiceImpl implements HelloService {
-
- public String sayHello(String name) {
- return "Hello, " + name + " from " + Thread.currentThread().getName();
- }
-}
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/resources/META-INF/isolation/dubbo-consumer.xml b/99-integration/dubbo-samples-isolation-executor/src/test/resources/META-INF/isolation/dubbo-consumer.xml
deleted file mode 100644
index b2429fe3b..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/resources/META-INF/isolation/dubbo-consumer.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
- xmlns="http://www.springframework.org/schema/beans"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
- http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">
-
- <dubbo:application name="demo-consumer">
- </dubbo:application>
-
- <dubbo:metadata-report address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
-
- <dubbo:registry id="demo1" address="zookeeper://${zookeeper.address:127.0.0.1}:2181?registry-type=service"/>
-
- <!-- refer with dubbo protocol-->
- <dubbo:reference version="1.0.0" group="Group1" id="dubbo-demoServiceV1" check="false" scope="remote"
- interface="org.apache.dubbo.samples.support.DemoService" protocol="dubbo"/>
-
- <dubbo:reference version="2.0.0" group="Group2" id="dubbo-helloServiceV2" check="false" scope="remote"
- interface="org.apache.dubbo.samples.support.HelloService" protocol="dubbo"/>
-
- <dubbo:reference version="3.0.0" group="Group3" id="dubbo-helloServiceV3" check="false" scope="remote"
- interface="org.apache.dubbo.samples.support.HelloService" protocol="dubbo"/>
-
- <!-- refer with tri protocol-->
- <dubbo:reference version="1.0.0" group="Group1" id="tri-demoServiceV1" check="false" scope="remote"
- interface="org.apache.dubbo.samples.support.DemoService" protocol="tri"/>
-
- <dubbo:reference version="2.0.0" group="Group2" id="tri-helloServiceV2" check="false" scope="remote"
- interface="org.apache.dubbo.samples.support.HelloService" protocol="tri"/>
-
- <dubbo:reference version="3.0.0" group="Group3" id="tri-helloServiceV3" check="false" scope="remote"
- interface="org.apache.dubbo.samples.support.HelloService" protocol="tri"/>
-
-</beans>
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/resources/META-INF/isolation/dubbo-provider.xml b/99-integration/dubbo-samples-isolation-executor/src/test/resources/META-INF/isolation/dubbo-provider.xml
deleted file mode 100644
index 042117616..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/resources/META-INF/isolation/dubbo-provider.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
- xmlns="http://www.springframework.org/schema/beans"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
- http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">
-
- <!-- NOTE: we need config executor-management-mode="isolation" -->
- <dubbo:application name="demo-provider" executor-management-mode="isolation">
- </dubbo:application>
-
- <dubbo:config-center address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
- <dubbo:metadata-report address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
- <dubbo:registry id="registry1" address="zookeeper://${zookeeper.address:127.0.0.1}:2181?registry-type=service"/>
-
- <dubbo:protocol name="dubbo" port="-1"/>
- <dubbo:protocol name="tri" port="-1"/>
-
- <!-- expose three service with dubbo and tri protocol-->
- <bean id="demoServiceV1" class="org.apache.dubbo.samples.support.DemoServiceImpl"/>
- <bean id="helloServiceV2" class="org.apache.dubbo.samples.support.HelloServiceImpl"/>
- <bean id="helloServiceV3" class="org.apache.dubbo.samples.support.HelloServiceImpl"/>
-
- <!-- customized thread pool -->
- <bean id="executor-demo-service"
- class="org.apache.dubbo.samples.spring.support.DemoServiceExecutor"/>
- <bean id="executor-hello-service"
- class="org.apache.dubbo.samples.spring.support.HelloServiceExecutor"/>
-
- <!-- this service use [executor="executor-demo-service"] as isolated thread pool-->
- <dubbo:service executor="executor-demo-service"
- interface="org.apache.dubbo.samples.support.DemoService" version="1.0.0" group="Group1"
- timeout="3000" ref="demoServiceV1" registry="registry1" protocol="dubbo,tri"/>
-
- <!-- this service use [executor="executor-hello-service"] as isolated thread pool-->
- <dubbo:service executor="executor-hello-service"
- interface="org.apache.dubbo.samples.support.HelloService" version="2.0.0" group="Group2"
- timeout="5000" ref="helloServiceV2" registry="registry1" protocol="dubbo,tri"/>
-
- <!-- not set executor for this service, the default executor built using threadpool parameter of the protocolConfig -->
- <dubbo:service interface="org.apache.dubbo.samples.support.HelloService" version="3.0.0" group="Group3"
- timeout="5000" ref="helloServiceV3" registry="registry1" protocol="dubbo,tri"/>
-
-</beans>
diff --git a/99-integration/dubbo-samples-isolation-executor/src/test/resources/log4j2-test.xml b/99-integration/dubbo-samples-isolation-executor/src/test/resources/log4j2-test.xml
deleted file mode 100644
index 41bc586a8..000000000
--- a/99-integration/dubbo-samples-isolation-executor/src/test/resources/log4j2-test.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT" follow="true">
- <PatternLayout pattern="%d{HH:mm:ss.SSS} |-%highlight{%-5p} [%t] %40.40c:%-3L -| %m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect,org.junit)}" charset="UTF-8"/>
- </Console>
- </Appenders>
- <Loggers>
- <Root level="info">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
diff --git a/99-integration/dubbo-samples-memory-server/case-configuration.yml b/99-integration/dubbo-samples-memory-server/case-configuration.yml
deleted file mode 100644
index f8d3a7808..000000000
--- a/99-integration/dubbo-samples-memory-server/case-configuration.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-timeout: 1000
-
-services:
- zookeeper:
- image: zookeeper:latest
-
- provider:
- type: app
- basedir: .
- mainClass: org.apache.dubbo.samples.provider.Application
- systemProps:
- - zookeeper.address=zookeeper
- waitPortsBeforeRun:
- - zookeeper:2181
- checkPorts:
- - 20880
- checkLog: "dubbo service started"
- depends_on:
- - zookeeper
-
- test:
- type: test
- basedir: .
- tests:
- - "**/*IT.class"
- systemProps:
- - zookeeper.address=zookeeper
- waitPortsBeforeRun:
- - zookeeper:2181
- - provider:20880
- depends_on:
- - zookeeper
- - provider
diff --git a/99-integration/dubbo-samples-memory-server/case-versions.conf b/99-integration/dubbo-samples-memory-server/case-versions.conf
deleted file mode 100644
index 0ad1517ea..000000000
--- a/99-integration/dubbo-samples-memory-server/case-versions.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# Spring app
-dubbo.version= [ >= 3.2.0 ]
-java.version= [ >= 8 ]
diff --git a/99-integration/dubbo-samples-memory-server/pom.xml b/99-integration/dubbo-samples-memory-server/pom.xml
deleted file mode 100644
index 91e7d9f83..000000000
--- a/99-integration/dubbo-samples-memory-server/pom.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.apache</groupId>
- <artifactId>apache</artifactId>
- <version>23</version>
- <relativePath/>
- </parent>
-
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
-
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-samples-memory-server</artifactId>
- <name>Dubbo Samples Memory Bench for One Server - Many Client</name>
- <description>Dubbo Samples Memory Bench for One Server - Many Client</description>
-
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <dubbo.version>3.2.6</dubbo.version>
- <log4j2.version>2.20.0</log4j2.version>
- <protobuf-java.version>3.24.3</protobuf-java.version>
- <junit5.version>5.9.2</junit5.version>
- <awaitility.version>4.2.0</awaitility.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>${protobuf-java.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <artifactId>logback-classic</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>logback-core</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <version>${junit5.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- <version>${junit5.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-params</artifactId>
- <version>${junit5.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <version>${awaitility.version}</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java b/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
deleted file mode 100644
index 06e28773e..000000000
--- a/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.api;
-
-public interface GreetingsService {
-
- String sayHi(String name);
-
-}
diff --git a/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/api/QosService.java b/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/api/QosService.java
deleted file mode 100644
index 22329a94c..000000000
--- a/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/api/QosService.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.api;
-
-public interface QosService {
- long usedMemory();
-}
diff --git a/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/provider/Application.java b/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/provider/Application.java
deleted file mode 100644
index aaf9d79d6..000000000
--- a/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/provider/Application.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.provider;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ProtocolConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.config.bootstrap.DubboBootstrap;
-import org.apache.dubbo.samples.api.GreetingsService;
-import org.apache.dubbo.samples.api.QosService;
-
-public class Application {
- private static final String ZOOKEEPER_HOST = System.getProperty("zookeeper.address", "127.0.0.1");
- private static final String ZOOKEEPER_PORT = System.getProperty("zookeeper.port", "2181");
- private static final String ZOOKEEPER_ADDRESS = "zookeeper://" + ZOOKEEPER_HOST + ":" + ZOOKEEPER_PORT;
-
- public static void main(String[] args) {
- System.setProperty("dubbo.application.metadata.publish.delay", "1");
- ServiceConfig<GreetingsService> service = new ServiceConfig<>();
- service.setInterface(GreetingsService.class);
- service.setRef(new GreetingsServiceImpl());
- service.setTimeout(60000);
- ServiceConfig<QosService> qosService = new ServiceConfig<>();
- qosService.setInterface(QosService.class);
- qosService.setRef(new QosServiceImpl());
- qosService.setTimeout(60000);
- ApplicationConfig applicationConfig = new ApplicationConfig("first-dubbo-provider");
-
- DubboBootstrap dubboBootstrap = DubboBootstrap.getInstance()
- .application(applicationConfig)
- .registry(new RegistryConfig(ZOOKEEPER_ADDRESS))
- .protocol(new ProtocolConfig("dubbo", -1))
- .service(service)
- .service(qosService)
- .start();
-
- System.out.println("dubbo service started");
- dubboBootstrap.await();
- }
-}
diff --git a/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java b/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java
deleted file mode 100644
index d0d444843..000000000
--- a/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.provider;
-
-import org.apache.dubbo.samples.api.GreetingsService;
-
-public class GreetingsServiceImpl implements GreetingsService {
- @Override
- public String sayHi(String name) {
- return "hi, " + name;
- }
-}
diff --git a/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/provider/QosServiceImpl.java b/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/provider/QosServiceImpl.java
deleted file mode 100644
index 6188a3360..000000000
--- a/99-integration/dubbo-samples-memory-server/src/main/java/org/apache/dubbo/samples/provider/QosServiceImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.provider;
-
-import org.apache.dubbo.samples.api.QosService;
-
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.lang.management.ManagementFactory;
-import java.nio.charset.StandardCharsets;
-
-public class QosServiceImpl implements QosService {
- @Override
- public long usedMemory() {
- String pid = ManagementFactory.getRuntimeMXBean().getName().split("@")[0];
- try {
- Process process = Runtime.getRuntime().exec(
- String.format("jmap -histo:live %s", pid)
- );
- StringBuilder stringBuilder = new StringBuilder();
- InputStreamReader streamReader = new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);
- do {
- char[] chars = new char[1024];
- int len;
- while ((len = streamReader.read(chars)) != -1) {
- stringBuilder.append(chars, 0, len);
- }
- } while (process.isAlive());
-
- String[] strings = stringBuilder.toString().split("\n");
- for (String string : strings) {
- if (string.contains("Total")) {
- String a = string.trim();
- String trim = a.substring(a.lastIndexOf(" ")).trim();
- return Long.parseLong(trim);
- }
- }
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
-
- return Runtime.getRuntime().maxMemory() - Runtime.getRuntime().freeMemory();
- }
-}
diff --git a/99-integration/dubbo-samples-memory-server/src/main/resources/log4j2.xml b/99-integration/dubbo-samples-memory-server/src/main/resources/log4j2.xml
deleted file mode 100644
index 69e1321d2..000000000
--- a/99-integration/dubbo-samples-memory-server/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT" follow="true">
- <PatternLayout pattern="%style{%d{HH:mm:ss.SSS}}{Magenta} %style{|-}{White}%highlight{%-5p} [%t] %style{%40.40c}{Cyan}:%style{%-3L}{Blue} %style{-|}{White} %m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect)}" disableAnsi="false" charset="UTF-8"/>
- </Console>
- </Appenders>
- <Loggers>
- <Root level="info">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
diff --git a/99-integration/dubbo-samples-memory-server/src/test/java/org/apache/dubbo/samples/client/GreetingServiceIT.java b/99-integration/dubbo-samples-memory-server/src/test/java/org/apache/dubbo/samples/client/GreetingServiceIT.java
deleted file mode 100644
index 6807591b7..000000000
--- a/99-integration/dubbo-samples-memory-server/src/test/java/org/apache/dubbo/samples/client/GreetingServiceIT.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.client;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.bootstrap.DubboBootstrap;
-import org.apache.dubbo.rpc.model.ApplicationModel;
-import org.apache.dubbo.rpc.model.FrameworkModel;
-import org.apache.dubbo.samples.api.GreetingsService;
-import org.apache.dubbo.samples.api.QosService;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-import java.util.stream.IntStream;
-
-class GreetingServiceIT {
- private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
-
- @Test
- void test() {
- ReferenceConfig<QosService> qosReference = new ReferenceConfig<>();
- qosReference.setInterface(QosService.class);
-
- DubboBootstrap.getInstance()
- .application(new ApplicationConfig("first-dubbo-consumer"))
- .registry(new RegistryConfig("zookeeper://" + zookeeperHost + ":2181?enable-empty-protection=false"))
- .reference(qosReference)
- .start();
-
- bench(100);
-
- QosService qosService = qosReference.get();
- long memoryStart = qosService.usedMemory();
-
- for (int i = 0; i < 10; i++) {
- bench(100);
- long endMemory = qosService.usedMemory();
- System.out.println("Used: " + endMemory);
- System.out.println("Delta: " + (endMemory - memoryStart));
- Assertions.assertTrue((endMemory - memoryStart) < 100000);
- }
- }
-
- private static void bench(int range) {
- IntStream.range(0, range)
- .parallel()
- .forEach((ignore)->{
- FrameworkModel frameworkModel = new FrameworkModel();
- ApplicationModel applicationModel = frameworkModel.newApplication();
- ReferenceConfig<GreetingsService> reference = new ReferenceConfig<>();
- reference.setInterface(GreetingsService.class);
-
- ApplicationConfig applicationConfig = new ApplicationConfig("first-dubbo-consumer");
- applicationConfig.setMetadataType("remote");
- applicationConfig.setQosEnable(false);
- DubboBootstrap.getInstance(applicationModel)
- .application(applicationConfig)
- .registry(new RegistryConfig("zookeeper://" + zookeeperHost + ":2181?enable-empty-protection=false"))
- .reference(reference)
- .start();
-
- GreetingsService service = reference.get();
- for (int i = 0; i < 10; i++) {
- service.sayHi("dubbo");
- }
- frameworkModel.destroy();
- });
- }
-}
diff --git a/99-integration/dubbo-samples-memory-tri-server/case-configuration.yml b/99-integration/dubbo-samples-memory-tri-server/case-configuration.yml
deleted file mode 100644
index 72af9c33c..000000000
--- a/99-integration/dubbo-samples-memory-tri-server/case-configuration.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-timeout: 1000
-
-services:
- zookeeper:
- image: zookeeper:latest
-
- provider:
- type: app
- basedir: .
- mainClass: org.apache.dubbo.samples.provider.Application
- systemProps:
- - zookeeper.address=zookeeper
- waitPortsBeforeRun:
- - zookeeper:2181
- checkPorts:
- - 50051
- checkLog: "dubbo service started"
- depends_on:
- - zookeeper
-
- test:
- type: test
- basedir: .
- tests:
- - "**/*IT.class"
- systemProps:
- - zookeeper.address=zookeeper
- waitPortsBeforeRun:
- - zookeeper:2181
- - provider:50051
- depends_on:
- - zookeeper
- - provider
diff --git a/99-integration/dubbo-samples-memory-tri-server/case-versions.conf b/99-integration/dubbo-samples-memory-tri-server/case-versions.conf
deleted file mode 100644
index 0ad1517ea..000000000
--- a/99-integration/dubbo-samples-memory-tri-server/case-versions.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# Spring app
-dubbo.version= [ >= 3.2.0 ]
-java.version= [ >= 8 ]
diff --git a/99-integration/dubbo-samples-memory-tri-server/pom.xml b/99-integration/dubbo-samples-memory-tri-server/pom.xml
deleted file mode 100644
index ac7e80d50..000000000
--- a/99-integration/dubbo-samples-memory-tri-server/pom.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.apache</groupId>
- <artifactId>apache</artifactId>
- <version>23</version>
- <relativePath/>
- </parent>
-
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
-
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-samples-memory-tri-server</artifactId>
- <name>Dubbo Samples Memory Bench for One Server - Many Client (Triple)</name>
- <description>Dubbo Samples Memory Bench for One Server - Many Client (Triple)</description>
-
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <dubbo.version>3.2.6</dubbo.version>
- <protobuf-java.version>3.24.3</protobuf-java.version>
- <log4j2.version>2.20.0</log4j2.version>
- <junit5.version>5.9.2</junit5.version>
- <awaitility.version>4.2.0</awaitility.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>${protobuf-java.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <artifactId>logback-classic</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>logback-core</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-engine</artifactId>
- <version>${junit5.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-api</artifactId>
- <version>${junit5.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-params</artifactId>
- <version>${junit5.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <version>${awaitility.version}</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java b/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
deleted file mode 100644
index 06e28773e..000000000
--- a/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.api;
-
-public interface GreetingsService {
-
- String sayHi(String name);
-
-}
diff --git a/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/api/QosService.java b/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/api/QosService.java
deleted file mode 100644
index 22329a94c..000000000
--- a/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/api/QosService.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.api;
-
-public interface QosService {
- long usedMemory();
-}
diff --git a/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/provider/Application.java b/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/provider/Application.java
deleted file mode 100644
index 3c1cb7352..000000000
--- a/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/provider/Application.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.provider;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ProtocolConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.ServiceConfig;
-import org.apache.dubbo.config.bootstrap.DubboBootstrap;
-import org.apache.dubbo.samples.api.GreetingsService;
-import org.apache.dubbo.samples.api.QosService;
-
-public class Application {
- private static final String ZOOKEEPER_HOST = System.getProperty("zookeeper.address", "127.0.0.1");
- private static final String ZOOKEEPER_PORT = System.getProperty("zookeeper.port", "2181");
- private static final String ZOOKEEPER_ADDRESS = "zookeeper://" + ZOOKEEPER_HOST + ":" + ZOOKEEPER_PORT;
-
- public static void main(String[] args) {
- System.setProperty("dubbo.application.metadata.publish.delay", "1");
- ServiceConfig<GreetingsService> service = new ServiceConfig<>();
- service.setInterface(GreetingsService.class);
- service.setRef(new GreetingsServiceImpl());
- ServiceConfig<QosService> qosService = new ServiceConfig<>();
- qosService.setInterface(QosService.class);
- qosService.setRef(new QosServiceImpl());
- ApplicationConfig applicationConfig = new ApplicationConfig("first-dubbo-provider");
-
- DubboBootstrap dubboBootstrap = DubboBootstrap.getInstance()
- .application(applicationConfig)
- .registry(new RegistryConfig(ZOOKEEPER_ADDRESS))
- .protocol(new ProtocolConfig("tri", -1))
- .service(service)
- .service(qosService)
- .start();
-
- System.out.println("dubbo service started");
- dubboBootstrap.await();
- }
-}
diff --git a/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java b/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java
deleted file mode 100644
index d0d444843..000000000
--- a/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/provider/GreetingsServiceImpl.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.provider;
-
-import org.apache.dubbo.samples.api.GreetingsService;
-
-public class GreetingsServiceImpl implements GreetingsService {
- @Override
- public String sayHi(String name) {
- return "hi, " + name;
- }
-}
diff --git a/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/provider/QosServiceImpl.java b/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/provider/QosServiceImpl.java
deleted file mode 100644
index 6188a3360..000000000
--- a/99-integration/dubbo-samples-memory-tri-server/src/main/java/org/apache/dubbo/samples/provider/QosServiceImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.provider;
-
-import org.apache.dubbo.samples.api.QosService;
-
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.lang.management.ManagementFactory;
-import java.nio.charset.StandardCharsets;
-
-public class QosServiceImpl implements QosService {
- @Override
- public long usedMemory() {
- String pid = ManagementFactory.getRuntimeMXBean().getName().split("@")[0];
- try {
- Process process = Runtime.getRuntime().exec(
- String.format("jmap -histo:live %s", pid)
- );
- StringBuilder stringBuilder = new StringBuilder();
- InputStreamReader streamReader = new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8);
- do {
- char[] chars = new char[1024];
- int len;
- while ((len = streamReader.read(chars)) != -1) {
- stringBuilder.append(chars, 0, len);
- }
- } while (process.isAlive());
-
- String[] strings = stringBuilder.toString().split("\n");
- for (String string : strings) {
- if (string.contains("Total")) {
- String a = string.trim();
- String trim = a.substring(a.lastIndexOf(" ")).trim();
- return Long.parseLong(trim);
- }
- }
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
-
- return Runtime.getRuntime().maxMemory() - Runtime.getRuntime().freeMemory();
- }
-}
diff --git a/99-integration/dubbo-samples-memory-tri-server/src/main/resources/log4j2.xml b/99-integration/dubbo-samples-memory-tri-server/src/main/resources/log4j2.xml
deleted file mode 100644
index 8cdef4ac7..000000000
--- a/99-integration/dubbo-samples-memory-tri-server/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT" follow="true">
- <PatternLayout pattern="%style{%d{HH:mm:ss.SSS}}{Magenta} %style{|-}{White}%highlight{%-5p} [%t] %style{%40.40c}{Cyan}:%style{%-3L}{Blue} %style{-|}{White} %m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect)}" disableAnsi="false" charset="UTF-8"/>
- </Console>
- </Appenders>
- <Loggers>
- <Root level="error">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
diff --git a/99-integration/dubbo-samples-memory-tri-server/src/test/java/org/apache/dubbo/samples/client/GreetingServiceIT.java b/99-integration/dubbo-samples-memory-tri-server/src/test/java/org/apache/dubbo/samples/client/GreetingServiceIT.java
deleted file mode 100644
index 6807591b7..000000000
--- a/99-integration/dubbo-samples-memory-tri-server/src/test/java/org/apache/dubbo/samples/client/GreetingServiceIT.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.client;
-
-import org.apache.dubbo.config.ApplicationConfig;
-import org.apache.dubbo.config.ReferenceConfig;
-import org.apache.dubbo.config.RegistryConfig;
-import org.apache.dubbo.config.bootstrap.DubboBootstrap;
-import org.apache.dubbo.rpc.model.ApplicationModel;
-import org.apache.dubbo.rpc.model.FrameworkModel;
-import org.apache.dubbo.samples.api.GreetingsService;
-import org.apache.dubbo.samples.api.QosService;
-
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-import java.util.stream.IntStream;
-
-class GreetingServiceIT {
- private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
-
- @Test
- void test() {
- ReferenceConfig<QosService> qosReference = new ReferenceConfig<>();
- qosReference.setInterface(QosService.class);
-
- DubboBootstrap.getInstance()
- .application(new ApplicationConfig("first-dubbo-consumer"))
- .registry(new RegistryConfig("zookeeper://" + zookeeperHost + ":2181?enable-empty-protection=false"))
- .reference(qosReference)
- .start();
-
- bench(100);
-
- QosService qosService = qosReference.get();
- long memoryStart = qosService.usedMemory();
-
- for (int i = 0; i < 10; i++) {
- bench(100);
- long endMemory = qosService.usedMemory();
- System.out.println("Used: " + endMemory);
- System.out.println("Delta: " + (endMemory - memoryStart));
- Assertions.assertTrue((endMemory - memoryStart) < 100000);
- }
- }
-
- private static void bench(int range) {
- IntStream.range(0, range)
- .parallel()
- .forEach((ignore)->{
- FrameworkModel frameworkModel = new FrameworkModel();
- ApplicationModel applicationModel = frameworkModel.newApplication();
- ReferenceConfig<GreetingsService> reference = new ReferenceConfig<>();
- reference.setInterface(GreetingsService.class);
-
- ApplicationConfig applicationConfig = new ApplicationConfig("first-dubbo-consumer");
- applicationConfig.setMetadataType("remote");
- applicationConfig.setQosEnable(false);
- DubboBootstrap.getInstance(applicationModel)
- .application(applicationConfig)
- .registry(new RegistryConfig("zookeeper://" + zookeeperHost + ":2181?enable-empty-protection=false"))
- .reference(reference)
- .start();
-
- GreetingsService service = reference.get();
- for (int i = 0; i < 10; i++) {
- service.sayHi("dubbo");
- }
- frameworkModel.destroy();
- });
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/README.md b/99-integration/dubbo-samples-metadata-report/README.md
deleted file mode 100644
index e373fb5e9..000000000
--- a/99-integration/dubbo-samples-metadata-report/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-
-How to run applicaton ?
-
-1. Run ZkClean to clean zookeeper configuration.
-2. Run XXProvider, there is some log in console
-3. Run XXConsumer, there is some log in console
-
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/case-configuration.yml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/case-configuration.yml
deleted file mode 100644
index 3f48ed79b..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/case-configuration.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from: app-builtin-zookeeper.yml
-
-props:
- project_name: dubbo-samples-metadata-report-configcenter
- main_class: org.apache.dubbo.samples.metadatareport.configcenter.MetadataConfigcenterProvider
- zookeeper_port: 2181
- dubbo_port: 20831
-
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/case-versions.conf b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/case-versions.conf
deleted file mode 100644
index f7373a530..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/case-versions.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# Spring app
-dubbo.version=2.7*, 3.*
-spring.version=4.*, 5.*
-java.version= [>= 8]
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/pom.xml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/pom.xml
deleted file mode 100644
index 0c1bae8e6..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/pom.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- ~
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
-
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-samples-metadata-report-configcenter</artifactId>
-
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <dubbo.version>3.2.6</dubbo.version>
- <spring.version>4.3.30.RELEASE</spring.version>
- <log4j2.version>2.20.0</log4j2.version>
- <junit.version>4.13.1</junit.version>
-
- <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-framework-bom</artifactId>
- <version>${spring.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <artifactId>logback-classic</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>logback-core</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <type>pom</type>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2.version}</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.10</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
- </dependency>
-
- <!-- Embedded Zookeeper Server Dependencies -->
- <dependency>
- <groupId>io.dropwizard.metrics</groupId>
- <artifactId>metrics-core</artifactId>
- <version>4.1.12.1</version>
- </dependency>
- <dependency>
- <groupId>org.xerial.snappy</groupId>
- <artifactId>snappy-java</artifactId>
- <version>1.1.10.5</version>
- </dependency>
- </dependencies>
-
- <profiles>
- <!-- For jdk 11 above JavaEE annotation -->
- <profile>
- <id>javax.annotation</id>
- <activation>
- <jdk>[1.11,)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <version>1.3.2</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler-plugin.version}</version>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/EmbeddedZooKeeper.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/EmbeddedZooKeeper.java
deleted file mode 100644
index c72bd48aa..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/EmbeddedZooKeeper.java
+++ /dev/null
@@ -1,309 +0,0 @@
-
-/*
- * Copyright 2014 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.metadatareport.configcenter;
-
-import org.apache.zookeeper.server.ServerConfig;
-import org.apache.zookeeper.server.ZooKeeperServerMain;
-import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.SmartLifecycle;
-import org.springframework.util.ErrorHandler;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.ServerSocket;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-import java.util.UUID;
-import java.util.stream.Collectors;
-
-/**
- * from: https://github.com/spring-projects/spring-xd/blob/v1.3.1.RELEASE/spring-xd-dirt/src/main/java/org/springframework/xd/dirt/zookeeper/ZooKeeperUtils.java
- * <p>
- * Helper class to start an embedded instance of standalone (non clustered) ZooKeeper.
- * <p>
- * NOTE: at least an external standalone server (if not an ensemble) are recommended, even for
- * {@link org.springframework.xd.dirt.server.singlenode.SingleNodeApplication}
- *
- * @author Patrick Peralta
- * @author Mark Fisher
- * @author David Turanski
- */
-public class EmbeddedZooKeeper implements SmartLifecycle {
-
- private static final Random RANDOM = new Random();
-
- /**
- * Logger.
- */
- private static final Logger logger = LoggerFactory.getLogger(EmbeddedZooKeeper.class);
-
- /**
- * ZooKeeper client port. This will be determined dynamically upon startup.
- */
- private final int clientPort;
-
- /**
- * Whether to auto-start. Default is true.
- */
- private boolean autoStartup = true;
-
- /**
- * Lifecycle phase. Default is 0.
- */
- private int phase = 0;
-
- /**
- * Thread for running the ZooKeeper server.
- */
- private volatile Thread zkServerThread;
-
- /**
- * ZooKeeper server.
- */
- private volatile ZooKeeperServerMain zkServer;
-
- /**
- * {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread.
- */
- private ErrorHandler errorHandler;
-
- private boolean daemon = true;
-
- /**
- * Construct an EmbeddedZooKeeper with a random port.
- */
- public EmbeddedZooKeeper() {
- clientPort = findRandomPort(30000, 65535);
- }
-
- /**
- * Construct an EmbeddedZooKeeper with the provided port.
- *
- * @param clientPort port for ZooKeeper server to bind to
- */
- public EmbeddedZooKeeper(int clientPort, boolean daemon) {
- this.clientPort = clientPort;
- this.daemon = daemon;
- }
-
- /**
- * Returns the port that clients should use to connect to this embedded server.
- *
- * @return dynamically determined client port
- */
- public int getClientPort() {
- return this.clientPort;
- }
-
- /**
- * Specify whether to start automatically. Default is true.
- *
- * @param autoStartup whether to start automatically
- */
- public void setAutoStartup(boolean autoStartup) {
- this.autoStartup = autoStartup;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAutoStartup() {
- return this.autoStartup;
- }
-
- /**
- * Specify the lifecycle phase for the embedded server.
- *
- * @param phase the lifecycle phase
- */
- public void setPhase(int phase) {
- this.phase = phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getPhase() {
- return this.phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isRunning() {
- return (zkServerThread != null);
- }
-
- /**
- * Start the ZooKeeper server in a background thread.
- * <p>
- * Register an error handler via {@link #setErrorHandler} in order to handle
- * any exceptions thrown during startup or execution.
- */
- @Override
- public synchronized void start() {
- if (zkServerThread == null) {
- zkServerThread = new Thread(new ServerRunnable(), "ZooKeeper Server Starter");
- zkServerThread.setDaemon(daemon);
- zkServerThread.start();
- }
- }
-
- /**
- * Shutdown the ZooKeeper server.
- */
- @Override
- public synchronized void stop() {
- if (zkServerThread != null) {
- // The shutdown method is protected...thus this hack to invoke it.
- // This will log an exception on shutdown; see
- // https://issues.apache.org/jira/browse/ZOOKEEPER-1873 for details.
- try {
- Method shutdown = ZooKeeperServerMain.class.getDeclaredMethod("shutdown");
- shutdown.setAccessible(true);
- shutdown.invoke(zkServer);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- // It is expected that the thread will exit after
- // the server is shutdown; this will block until
- // the shutdown is complete.
- try {
- zkServerThread.join(5000);
- zkServerThread = null;
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- logger.warn("Interrupted while waiting for embedded ZooKeeper to exit");
- // abandoning zk thread
- zkServerThread = null;
- }
- }
- }
-
- /**
- * Stop the server if running and invoke the callback when complete.
- */
- @Override
- public void stop(Runnable callback) {
- stop();
- callback.run();
- }
-
- /**
- * Provide an {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread. If none
- * is provided, only error-level logging will occur.
- *
- * @param errorHandler the {@link ErrorHandler} to be invoked
- */
- public void setErrorHandler(ErrorHandler errorHandler) {
- this.errorHandler = errorHandler;
- }
-
- /**
- * Runnable implementation that starts the ZooKeeper server.
- */
- private class ServerRunnable implements Runnable {
-
- @Override
- public void run() {
- try {
- Properties properties = new Properties();
- File file = new File(System.getProperty("java.io.tmpdir")
- + File.separator + UUID.randomUUID());
- file.deleteOnExit();
- properties.setProperty("dataDir", file.getAbsolutePath());
- properties.setProperty("clientPort", String.valueOf(clientPort));
-
- QuorumPeerConfig quorumPeerConfig = new QuorumPeerConfig();
- quorumPeerConfig.parseProperties(properties);
-
- zkServer = new ZooKeeperServerMain();
- ServerConfig configuration = new ServerConfig();
- configuration.readFrom(quorumPeerConfig);
-
- System.setProperty("zookeeper.admin.enableServer", "false");
-
- zkServer.runFromConfig(configuration);
- } catch (Exception e) {
- if (errorHandler != null) {
- errorHandler.handleError(e);
- } else {
- logger.error("Exception running embedded ZooKeeper", e);
- }
- }
- }
- }
-
- /**
- * Workaround for SocketUtils.findRandomPort() deprecation.
- *
- * @param min min port
- * @param max max port
- * @return a random generated available port
- */
- private static int findRandomPort(int min, int max) {
- if (min < 1024) {
- throw new IllegalArgumentException("Max port shouldn't be less than 1024.");
- }
-
- if (max > 65535) {
- throw new IllegalArgumentException("Max port shouldn't be greater than 65535.");
- }
-
- if (min > max) {
- throw new IllegalArgumentException("Min port shouldn't be greater than max port.");
- }
-
- int port = 0;
- int counter = 0;
-
- // Workaround for legacy JDK doesn't support Random.nextInt(min, max).
- List<Integer> randomInts = RANDOM.ints(min, max + 1)
- .limit(max - min)
- .mapToObj(Integer::valueOf)
- .collect(Collectors.toList());
-
- do {
- if (counter > max - min) {
- throw new IllegalStateException("Unable to find a port between " + min + "-" + max);
- }
-
- port = randomInts.get(counter);
- counter++;
- } while (isPortInUse(port));
-
- return port;
- }
-
- private static boolean isPortInUse(int port) {
- try (ServerSocket ignored = new ServerSocket(port)) {
- return false;
- } catch (IOException e) {
- // continue
- }
- return true;
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterConsumer.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterConsumer.java
deleted file mode 100644
index a684092a3..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterConsumer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.configcenter;
-
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.apache.dubbo.samples.metadatareport.configcenter.action.AnnotationAction;
-import org.apache.dubbo.samples.metadatareport.configcenter.api.AnnotationService;
-
-import org.springframework.context.annotation.AnnotationConfigApplicationContext;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
-
-public class MetadataConfigcenterConsumer {
-
- public static void main(String[] args) throws Exception {
- AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConsumerConfiguration.class);
- context.start();
-
- printServiceData();
-
- AnnotationAction annotationAction = context.getBean("annotationAction", AnnotationAction.class);
- String hello = annotationAction.doSayHello("world");
- System.out.println("result: " + hello);
- }
-
- @Configuration
- @EnableDubbo(scanBasePackages = "org.apache.dubbo.samples.metadatareport.configcenter.action")
- @PropertySource("classpath:/spring/dubbo-consumer.properties")
- @ComponentScan(value = {"org.apache.dubbo.samples.metadatareport.configcenter.action"})
- static public class ConsumerConfiguration {
-
- }
-
-
- private static void printServiceData() throws Exception {
- Thread.sleep(3000);
- System.out.println("*********************************************************");
- System.out.println("service metadata:");
- System.out.println(ZKTools.getMetadata("/dubbo", AnnotationService.class.getName(), "1.1.1", "d-test",
- CommonConstants.CONSUMER_SIDE, "metadatareport-configcenter-consumer"));
- System.out.println("*********************************************************");
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterProvider.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterProvider.java
deleted file mode 100644
index b9e5783f9..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataConfigcenterProvider.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.configcenter;
-
-
-import org.apache.dubbo.common.Version;
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.config.ProviderConfig;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.apache.dubbo.samples.metadatareport.configcenter.api.AnnotationService;
-
-import org.springframework.context.annotation.AnnotationConfigApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
-
-import java.util.concurrent.CountDownLatch;
-
-import static org.apache.dubbo.samples.metadatareport.configcenter.ZKTools.VERSION300;
-
-public class MetadataConfigcenterProvider {
-
- public static void main(String[] args) throws Exception {
- new EmbeddedZooKeeper(2181, false).start();
-
- try {
- ZKTools.generateDubboProperties();
- AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ProviderConfiguration.class);
- context.start();
-
- printServiceData();
-
- System.out.println("dubbo service started");
- new CountDownLatch(1).await();
- } finally {
- ZKTools.removeDubboProperties();
- }
- }
-
- @Configuration
- @EnableDubbo(scanBasePackages = "org.apache.dubbo.samples.metadatareport.configcenter.impl")
- @PropertySource("classpath:/spring/dubbo-provider.properties")
- static public class ProviderConfiguration {
- @Bean
- public ProviderConfig providerConfig() {
- ProviderConfig providerConfig = new ProviderConfig();
- // compatible with dubbo 2.7.x
- if (Version.getIntVersion(Version.getVersion()) < VERSION300) {
- // avoid using spring bean id 'providerConfig' as dubbo config id.
- providerConfig.setId("my-provider");
- } else {
- //TODO remove the following line after merging dubbo 3.0 config refactor pr
- providerConfig.setId("my-provider");
- }
- providerConfig.setTimeout(1000);
- return providerConfig;
- }
- }
-
- private static void printServiceData() throws Exception {
- Thread.sleep(3000);
- System.out.println("*********************************************************");
- System.out.println("service metadata:");
- System.out.println(ZKTools.getMetadata("/dubbo", AnnotationService.class.getName(), "1.1.1", "d-test",
- CommonConstants.PROVIDER_SIDE, "metadatareport-configcenter-provider"));
- System.out.println("*********************************************************");
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/ZKTools.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/ZKTools.java
deleted file mode 100644
index 0134f607b..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/ZKTools.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.metadatareport.configcenter;
-
-import org.apache.dubbo.common.Version;
-import org.apache.dubbo.common.utils.StringUtils;
-import org.apache.dubbo.metadata.report.identifier.KeyTypeEnum;
-import org.apache.dubbo.metadata.report.identifier.MetadataIdentifier;
-
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.curator.retry.ExponentialBackoffRetry;
-
-import static org.apache.dubbo.common.constants.CommonConstants.PATH_SEPARATOR;
-
-public class ZKTools {
- public static final String GLOBAL_DUBBO_PROPERTIES_PATH = "/dubbo/config/dubbo/dubbo.properties";
- public static final String CONSUMER_DUBBO_PROPERTIES_PATH = "/dubbo/config/metadatareport-configcenter-consumer/dubbo.properties";
- public static final String PROVIDER_DUBBO_PROPERTIES_PATH = "/dubbo/config/metadatareport-configcenter-provider/dubbo.properties";
- private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
- private static CuratorFramework client;
-
- public static final int VERSION300 = Version.getIntVersion("3.0.0");
-
- static {
- initClient();
- }
-
- public static void main(String[] args) throws Exception {
- generateDubboProperties();
- removeDubboProperties();
- }
-
- public static void generateDubboProperties() {
- generateDubboPropertiesForGlobal();
- generateDubboPropertiesForProvider();
- generateDubboPropertiesForConsumer();
- }
-
- private static void initClient() {
- client = CuratorFrameworkFactory.newClient(zookeeperHost + ":2181", 60 * 1000, 60 * 1000,
- new ExponentialBackoffRetry(1000, 3));
- client.start();
- }
-
- public static void generateDubboPropertiesForGlobal() {
- String str = "dubbo.registry.address=zookeeper://" + zookeeperHost + ":2181\n" +
- "dubbo.metadata-report.address=zookeeper://" + zookeeperHost + ":2181\n" +
- "#global config for consumer\n" +
- "dubbo.consumer.timeout=6000\n" +
- "#global config for provider\n" +
- "dubbo.protocol.port=20831\n";
-
- if (Version.getIntVersion(Version.getVersion()) >= VERSION300) {
- // dubbo 3.x
- str += "dubbo.provider.timeout=5000\n";
- // TODO compatible with 3.0 preview and dev branch, remove the following line after merging dubbo 3.0 config refactor pr
- str += "dubbo.provider.my-provider.timeout=5000";
- } else {
- // compatible with dubbo 2.7.x
- str += "dubbo.provider.my-provider.timeout=5000";
- }
-
- System.out.println(str);
-
- try {
- String path = GLOBAL_DUBBO_PROPERTIES_PATH;
- if (client.checkExists().forPath(path) == null) {
- client.create().creatingParentsIfNeeded().forPath(path);
- }
- setData(path, str);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static void generateDubboPropertiesForConsumer() {
- String str = "dubbo.consumer.timeout=6666";
-
- System.out.println(str);
-
- try {
- String path = CONSUMER_DUBBO_PROPERTIES_PATH;
- if (client.checkExists().forPath(path) == null) {
- client.create().creatingParentsIfNeeded().forPath(path);
- }
- setData(path, str);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static void generateDubboPropertiesForProvider() {
- String str = "dubbo.protocol.threadpool=fixed\n" +
- "dubbo.protocol.threads=100";
-
- System.out.println(str);
-
- try {
- String path = PROVIDER_DUBBO_PROPERTIES_PATH;
- if (client.checkExists().forPath(path) == null) {
- client.create().creatingParentsIfNeeded().forPath(path);
- }
- setData(path, str);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- private static void setData(String path, String data) throws Exception {
- client.setData().forPath(path, data.getBytes());
- }
-
- private static String pathToKey(String path) {
- if (StringUtils.isEmpty(path)) {
- return path;
- }
- return path.replace("/dubbo/config/", "").replaceAll("/", ".");
- }
-
- private static void removeInterfaceData(Class interfaceClazz) {
- try {
- client.delete().forPath("/dubbo/" + interfaceClazz.getName().replaceAll("\\.", "/"));
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static String getMetadata(String root, String serviceInterface, String version, String group,
- String side, String app) throws Exception {
- String path = getNodePath(root, new MetadataIdentifier(serviceInterface, version, group, side, app));
- return new String(client.getData().forPath(path));
- }
-
- public static String getNodePath(String root, MetadataIdentifier metadataIdentifier) {
- return toRootDir(root) + metadataIdentifier.getUniqueKey(KeyTypeEnum.PATH);
- }
-
- private static String toRootDir(String root) {
- if (root.equals(PATH_SEPARATOR)) {
- return root;
- }
- return root + PATH_SEPARATOR;
- }
-
- public static void removeDubboProperties() {
- try {
- client.delete().forPath(GLOBAL_DUBBO_PROPERTIES_PATH);
- client.delete().forPath(PROVIDER_DUBBO_PROPERTIES_PATH);
- client.delete().forPath(CONSUMER_DUBBO_PROPERTIES_PATH);
- client.delete().forPath(getParent(PROVIDER_DUBBO_PROPERTIES_PATH));
- client.delete().forPath(getParent(CONSUMER_DUBBO_PROPERTIES_PATH));
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- private static String getParent(String path) {
- return path.substring(0, PROVIDER_DUBBO_PROPERTIES_PATH.lastIndexOf('/'));
- }
-
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/action/AnnotationAction.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/action/AnnotationAction.java
deleted file mode 100644
index 6229347d3..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/action/AnnotationAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.configcenter.action;
-
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.samples.metadatareport.configcenter.api.AnnotationService;
-
-import org.springframework.stereotype.Component;
-
-@Component("annotationAction")
-public class AnnotationAction {
-
- @DubboReference(version = "1.1.1", group = "d-test", init = true)
- private AnnotationService annotationService;
-
- public String doSayHello(String name) {
- return annotationService.sayHello(name);
- }
-
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/api/AnnotationService.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/api/AnnotationService.java
deleted file mode 100644
index 08b1a4d48..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/api/AnnotationService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.configcenter.api;
-
-public interface AnnotationService {
-
- String sayHello(String name);
-
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/impl/AnnotationServiceImpl.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/impl/AnnotationServiceImpl.java
deleted file mode 100644
index f37ff4d0b..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/java/org/apache/dubbo/samples/metadatareport/configcenter/impl/AnnotationServiceImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.configcenter.impl;
-
-import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.samples.metadatareport.configcenter.api.AnnotationService;
-
-@DubboService(version = "1.1.1", group = "d-test")
-public class AnnotationServiceImpl implements AnnotationService {
-
- @Override
- public String sayHello(String name) {
- System.out.println("received: " + name);
- return "annotation: hello, " + name;
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/resources/log4j2.xml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/resources/log4j2.xml
deleted file mode 100644
index 69e1321d2..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT" follow="true">
- <PatternLayout pattern="%style{%d{HH:mm:ss.SSS}}{Magenta} %style{|-}{White}%highlight{%-5p} [%t] %style{%40.40c}{Cyan}:%style{%-3L}{Blue} %style{-|}{White} %m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect)}" disableAnsi="false" charset="UTF-8"/>
- </Console>
- </Appenders>
- <Loggers>
- <Root level="info">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/resources/spring/dubbo-consumer.properties b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/resources/spring/dubbo-consumer.properties
deleted file mode 100644
index d08d63179..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/resources/spring/dubbo-consumer.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-dubbo.application.name=metadatareport-configcenter-consumer
-dubbo.config-center.address=zookeeper://${zookeeper.address:127.0.0.1}:2181
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/resources/spring/dubbo-provider.properties b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/resources/spring/dubbo-provider.properties
deleted file mode 100644
index c1ffb31d8..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/main/resources/spring/dubbo-provider.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-dubbo.application.name=metadatareport-configcenter-provider
-dubbo.config-center.address=zookeeper://${zookeeper.address:127.0.0.1}:2181
-dubbo.configCenter.configFile=dubbo.properties
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/test/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataIT.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/test/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataIT.java
deleted file mode 100644
index 3dc2078dc..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/src/test/java/org/apache/dubbo/samples/metadatareport/configcenter/MetadataIT.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.metadatareport.configcenter;
-
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.metadata.definition.model.FullServiceDefinition;
-import org.apache.dubbo.metadata.definition.model.MethodDefinition;
-import org.apache.dubbo.samples.metadatareport.configcenter.action.AnnotationAction;
-import org.apache.dubbo.samples.metadatareport.configcenter.api.AnnotationService;
-
-import com.google.gson.Gson;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-import java.util.List;
-import java.util.Map;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(classes = {MetadataConfigcenterConsumer.ConsumerConfiguration.class})
-public class MetadataIT {
- @Autowired
- private AnnotationAction action;
-
- /**
- * <pre>
- * {
- * "parameters": {
- * "side": "provider",
- * "release": "2.7.2",
- * "methods": "sayHello",
- * "deprecated": "false",
- * "dubbo": "2.0.2",
- * "threads": "100",
- * "interface": "org.apache.dubbo.samples.metadatareport.configcenter.api.AnnotationService",
- * "threadpool": "fixed",
- * "version": "1.1.1",
- * "timeout": "5000",
- * "generic": "false",
- * "revision": "1.1.1",
- * "application": "metadatareport-configcenter-provider",
- * "dynamic": "true",
- * "register": null,
- * "bean.name": "ServiceBean:org.apache.dubbo.samples.metadatareport.configcenter.api.AnnotationService:1.1.1:d-test",
- * "group": "d-test",
- * "anyhost": "true"
- * },
- * "canonicalName": "org.apache.dubbo.samples.metadatareport.configcenter.api.AnnotationService",
- * "codeSource": "file:/github/dubbo/incubator-dubbo-samples/dubbo-samples-metadata-report/dubbo-samples-metadata-report-configcenter/target/classes/",
- * "methods": [
- * {
- * "name": "sayHello",
- * "parameterTypes": [
- * "java.lang.String"
- * ],
- * "returnType": "java.lang.String"
- * }
- * ],
- * "types": [
- * {
- * "type": "int"
- * },
- * {
- * "type": "char"
- * },
- * {
- * "type": "java.lang.String",
- * "properties": {
- * "value": {
- * "type": "char[]"
- * },
- * "hash": {
- * "type": "int"
- * }
- * }
- * }
- * ]
- * }
- * </pre>
- */
- @Test
- public void testProviderMetadata() throws Exception {
- String result = ZKTools.getMetadata("/dubbo", AnnotationService.class.getName(), "1.1.1", "d-test",
- CommonConstants.PROVIDER_SIDE, "metadatareport-configcenter-provider");
- Gson gson = new Gson();
- FullServiceDefinition definition = gson.fromJson(result, FullServiceDefinition.class);
- Map<String, String> parameters = definition.getParameters();
- Assert.assertEquals("provider", parameters.get("side"));
- Assert.assertEquals("sayHello", parameters.get("methods"));
- Assert.assertEquals("5000", parameters.get("timeout"));
- Assert.assertEquals("1.1.1", parameters.get("version"));
- Assert.assertEquals("d-test", parameters.get("group"));
- Assert.assertEquals("100", parameters.get("threads"));
- Assert.assertEquals("fixed", parameters.get("threadpool"));
- Assert.assertEquals(AnnotationService.class.getCanonicalName(), parameters.get("interface"));
- Assert.assertEquals("false", parameters.get("generic"));
- Assert.assertEquals("metadatareport-configcenter-provider", parameters.get("application"));
- Assert.assertEquals("true", parameters.get("dynamic"));
- Assert.assertEquals("true", parameters.get("anyhost"));
- Assert.assertEquals(AnnotationService.class.getCanonicalName(), definition.getCanonicalName());
- List<MethodDefinition> methods = definition.getMethods();
- Assert.assertEquals(1, methods.size());
- MethodDefinition method = methods.get(0);
- Assert.assertEquals("sayHello", method.getName());
- String[] parameterTypes = method.getParameterTypes();
- Assert.assertEquals(1, parameterTypes.length);
- Assert.assertEquals("java.lang.String", parameterTypes[0]);
- Assert.assertEquals("java.lang.String", method.getReturnType());
- }
-
- /**
- * <pre>
- * {
- * "side": "consumer",
- * "release": "2.7.2",
- * "methods": "sayHello",
- * "lazy": "false",
- * "dubbo": "2.0.2",
- * "interface": "org.apache.dubbo.samples.metadatareport.configcenter.api.AnnotationService",
- * "version": "1.1.1",
- * "timeout": "6666",
- * "revision": "1.1.1",
- * "application": "metadatareport-configcenter-consumer",
- * "sticky": "false",
- * "group": "d-test"
- * }
- * </pre>
- */
- @Test
- public void testConsumerMetadata() throws Exception {
- //wait for consumer metadata report finish
- Thread.sleep(1000);
-
- String result = ZKTools.getMetadata("/dubbo", AnnotationService.class.getName(), "1.1.1", "d-test",
- CommonConstants.CONSUMER_SIDE, "metadatareport-configcenter-consumer");
- Gson gson = new Gson();
- Map<String, String> map = gson.fromJson(result, Map.class);
- Assert.assertEquals("consumer", map.get("side"));
- Assert.assertEquals("metadatareport-configcenter-consumer", map.get("application"));
- Assert.assertEquals("sayHello", map.get("methods"));
- Assert.assertNull(map.get("lazy"));
- Assert.assertEquals("false", map.get("sticky"));
- Assert.assertEquals("1.1.1", map.get("version"));
- Assert.assertEquals("d-test", map.get("group"));
- Assert.assertEquals("6666", map.get("timeout"));
- Assert.assertEquals(AnnotationService.class.getName(), map.get("interface"));
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/case-configuration.yml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/case-configuration.yml
deleted file mode 100644
index 32c8b26c7..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/case-configuration.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from: app-builtin-zookeeper.yml
-
-props:
- project_name: dubbo-samples-metadata-report-local-annotation
- main_class: org.apache.dubbo.samples.metadatareport.local.annotation.MetadataLocalAnnotationProvider
- zookeeper_port: 2181
- dubbo_port: 20880
-
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/case-versions.conf b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/case-versions.conf
deleted file mode 100644
index f7373a530..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/case-versions.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# Spring app
-dubbo.version=2.7*, 3.*
-spring.version=4.*, 5.*
-java.version= [>= 8]
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/pom.xml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/pom.xml
deleted file mode 100644
index cb7828b3a..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/pom.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- ~
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
-
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-samples-metadata-report-local-annotation</artifactId>
-
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <dubbo.version>3.2.6</dubbo.version>
- <spring.version>4.3.30.RELEASE</spring.version>
- <log4j2.version>2.20.0</log4j2.version>
- <junit.version>4.13.1</junit.version>
-
- <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-framework-bom</artifactId>
- <version>${spring.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <artifactId>logback-classic</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>logback-core</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <type>pom</type>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.10</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
- </dependency>
-
- <!-- Embedded Zookeeper Server Dependencies -->
- <dependency>
- <groupId>io.dropwizard.metrics</groupId>
- <artifactId>metrics-core</artifactId>
- <version>4.1.12.1</version>
- </dependency>
- <dependency>
- <groupId>org.xerial.snappy</groupId>
- <artifactId>snappy-java</artifactId>
- <version>1.1.10.5</version>
- </dependency>
- </dependencies>
-
- <profiles>
- <!-- For jdk 11 above JavaEE annotation -->
- <profile>
- <id>javax.annotation</id>
- <activation>
- <jdk>[1.11,)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <version>1.3.2</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler-plugin.version}</version>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/EmbeddedZooKeeper.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/EmbeddedZooKeeper.java
deleted file mode 100644
index 72d5fb616..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/EmbeddedZooKeeper.java
+++ /dev/null
@@ -1,309 +0,0 @@
-
-/*
- * Copyright 2014 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.metadatareport.local.annotation;
-
-import org.apache.zookeeper.server.ServerConfig;
-import org.apache.zookeeper.server.ZooKeeperServerMain;
-import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.SmartLifecycle;
-import org.springframework.util.ErrorHandler;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.ServerSocket;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-import java.util.UUID;
-import java.util.stream.Collectors;
-
-/**
- * from: https://github.com/spring-projects/spring-xd/blob/v1.3.1.RELEASE/spring-xd-dirt/src/main/java/org/springframework/xd/dirt/zookeeper/ZooKeeperUtils.java
- * <p>
- * Helper class to start an embedded instance of standalone (non clustered) ZooKeeper.
- * <p>
- * NOTE: at least an external standalone server (if not an ensemble) are recommended, even for
- * {@link org.springframework.xd.dirt.server.singlenode.SingleNodeApplication}
- *
- * @author Patrick Peralta
- * @author Mark Fisher
- * @author David Turanski
- */
-public class EmbeddedZooKeeper implements SmartLifecycle {
-
- private static final Random RANDOM = new Random();
-
- /**
- * Logger.
- */
- private static final Logger logger = LoggerFactory.getLogger(EmbeddedZooKeeper.class);
-
- /**
- * ZooKeeper client port. This will be determined dynamically upon startup.
- */
- private final int clientPort;
-
- /**
- * Whether to auto-start. Default is true.
- */
- private boolean autoStartup = true;
-
- /**
- * Lifecycle phase. Default is 0.
- */
- private int phase = 0;
-
- /**
- * Thread for running the ZooKeeper server.
- */
- private volatile Thread zkServerThread;
-
- /**
- * ZooKeeper server.
- */
- private volatile ZooKeeperServerMain zkServer;
-
- /**
- * {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread.
- */
- private ErrorHandler errorHandler;
-
- private boolean daemon = true;
-
- /**
- * Construct an EmbeddedZooKeeper with a random port.
- */
- public EmbeddedZooKeeper() {
- clientPort = findRandomPort(30000, 65535);
- }
-
- /**
- * Construct an EmbeddedZooKeeper with the provided port.
- *
- * @param clientPort port for ZooKeeper server to bind to
- */
- public EmbeddedZooKeeper(int clientPort, boolean daemon) {
- this.clientPort = clientPort;
- this.daemon = daemon;
- }
-
- /**
- * Returns the port that clients should use to connect to this embedded server.
- *
- * @return dynamically determined client port
- */
- public int getClientPort() {
- return this.clientPort;
- }
-
- /**
- * Specify whether to start automatically. Default is true.
- *
- * @param autoStartup whether to start automatically
- */
- public void setAutoStartup(boolean autoStartup) {
- this.autoStartup = autoStartup;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAutoStartup() {
- return this.autoStartup;
- }
-
- /**
- * Specify the lifecycle phase for the embedded server.
- *
- * @param phase the lifecycle phase
- */
- public void setPhase(int phase) {
- this.phase = phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getPhase() {
- return this.phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isRunning() {
- return (zkServerThread != null);
- }
-
- /**
- * Start the ZooKeeper server in a background thread.
- * <p>
- * Register an error handler via {@link #setErrorHandler} in order to handle
- * any exceptions thrown during startup or execution.
- */
- @Override
- public synchronized void start() {
- if (zkServerThread == null) {
- zkServerThread = new Thread(new ServerRunnable(), "ZooKeeper Server Starter");
- zkServerThread.setDaemon(daemon);
- zkServerThread.start();
- }
- }
-
- /**
- * Shutdown the ZooKeeper server.
- */
- @Override
- public synchronized void stop() {
- if (zkServerThread != null) {
- // The shutdown method is protected...thus this hack to invoke it.
- // This will log an exception on shutdown; see
- // https://issues.apache.org/jira/browse/ZOOKEEPER-1873 for details.
- try {
- Method shutdown = ZooKeeperServerMain.class.getDeclaredMethod("shutdown");
- shutdown.setAccessible(true);
- shutdown.invoke(zkServer);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- // It is expected that the thread will exit after
- // the server is shutdown; this will block until
- // the shutdown is complete.
- try {
- zkServerThread.join(5000);
- zkServerThread = null;
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- logger.warn("Interrupted while waiting for embedded ZooKeeper to exit");
- // abandoning zk thread
- zkServerThread = null;
- }
- }
- }
-
- /**
- * Stop the server if running and invoke the callback when complete.
- */
- @Override
- public void stop(Runnable callback) {
- stop();
- callback.run();
- }
-
- /**
- * Provide an {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread. If none
- * is provided, only error-level logging will occur.
- *
- * @param errorHandler the {@link ErrorHandler} to be invoked
- */
- public void setErrorHandler(ErrorHandler errorHandler) {
- this.errorHandler = errorHandler;
- }
-
- /**
- * Runnable implementation that starts the ZooKeeper server.
- */
- private class ServerRunnable implements Runnable {
-
- @Override
- public void run() {
- try {
- Properties properties = new Properties();
- File file = new File(System.getProperty("java.io.tmpdir")
- + File.separator + UUID.randomUUID());
- file.deleteOnExit();
- properties.setProperty("dataDir", file.getAbsolutePath());
- properties.setProperty("clientPort", String.valueOf(clientPort));
-
- QuorumPeerConfig quorumPeerConfig = new QuorumPeerConfig();
- quorumPeerConfig.parseProperties(properties);
-
- zkServer = new ZooKeeperServerMain();
- ServerConfig configuration = new ServerConfig();
- configuration.readFrom(quorumPeerConfig);
-
- System.setProperty("zookeeper.admin.enableServer", "false");
-
- zkServer.runFromConfig(configuration);
- } catch (Exception e) {
- if (errorHandler != null) {
- errorHandler.handleError(e);
- } else {
- logger.error("Exception running embedded ZooKeeper", e);
- }
- }
- }
- }
-
- /**
- * Workaround for SocketUtils.findRandomPort() deprecation.
- *
- * @param min min port
- * @param max max port
- * @return a random generated available port
- */
- private static int findRandomPort(int min, int max) {
- if (min < 1024) {
- throw new IllegalArgumentException("Max port shouldn't be less than 1024.");
- }
-
- if (max > 65535) {
- throw new IllegalArgumentException("Max port shouldn't be greater than 65535.");
- }
-
- if (min > max) {
- throw new IllegalArgumentException("Min port shouldn't be greater than max port.");
- }
-
- int port = 0;
- int counter = 0;
-
- // Workaround for legacy JDK doesn't support Random.nextInt(min, max).
- List<Integer> randomInts = RANDOM.ints(min, max + 1)
- .limit(max - min)
- .mapToObj(Integer::valueOf)
- .collect(Collectors.toList());
-
- do {
- if (counter > max - min) {
- throw new IllegalStateException("Unable to find a port between " + min + "-" + max);
- }
-
- port = randomInts.get(counter);
- counter++;
- } while (isPortInUse(port));
-
- return port;
- }
-
- private static boolean isPortInUse(int port) {
- try (ServerSocket ignored = new ServerSocket(port)) {
- return false;
- } catch (IOException e) {
- // continue
- }
- return true;
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationConsumer.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationConsumer.java
deleted file mode 100644
index 163de593e..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationConsumer.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.local.annotation;
-
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.config.MetadataReportConfig;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.apache.dubbo.samples.metadatareport.local.annotation.action.AnnotationAction;
-import org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.AnnotationConfigApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
-
-public class MetadataLocalAnnotationConsumer {
-
- public static void main(String[] args) throws Exception {
- AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConsumerConfiguration.class);
- context.start();
-
- printServiceData();
-
- AnnotationAction annotationAction = context.getBean("annotationAction", AnnotationAction.class);
- String hello = annotationAction.doSayHello("world");
- System.out.println("result :" + hello);
- }
-
- @Configuration
- @EnableDubbo(scanBasePackages = "org.apache.dubbo.samples.metadatareport.local.annotation.action")
- @PropertySource("classpath:/spring/dubbo-consumer.properties")
- @ComponentScan(value = {"org.apache.dubbo.samples.metadatareport.local.annotation.action"})
- static public class ConsumerConfiguration {
- @Value("zookeeper://${zookeeper.address:127.0.0.1}:2181")
- private String zookeeperAddress;
-
- @Bean
- public MetadataReportConfig metadataReportConfig() {
- MetadataReportConfig metadataReportConfig = new MetadataReportConfig();
- metadataReportConfig.setAddress(zookeeperAddress);
- return metadataReportConfig;
- }
- }
-
- private static void printServiceData() throws Exception {
- Thread.sleep(3000);
- System.out.println("*********************************************************");
- System.out.println("service metadata:");
- System.out.println(ZkUtil.getMetadata("/dubbo", AnnotationService.class.getName(), "1.1.8", "d-test",
- CommonConstants.CONSUMER_SIDE, "metadatareport-local-annotation-consumer"));
- System.out.println("*********************************************************");
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationProvider.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationProvider.java
deleted file mode 100644
index 95af79356..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataLocalAnnotationProvider.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.local.annotation;
-
-
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.config.MetadataReportConfig;
-import org.apache.dubbo.config.ProviderConfig;
-import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.AnnotationConfigApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
-
-import java.util.concurrent.CountDownLatch;
-
-public class MetadataLocalAnnotationProvider {
-
- public static void main(String[] args) throws Exception {
- new EmbeddedZooKeeper(2181, false).start();
-
- AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ProviderConfiguration.class);
- context.start();
-
- printServiceData();
-
- System.out.println("dubbo service started");
- new CountDownLatch(1).await();
- }
-
- @Configuration
- @EnableDubbo(scanBasePackages = "org.apache.dubbo.samples.metadatareport.local.annotation.impl")
- @PropertySource("classpath:/spring/dubbo-provider.properties")
- static public class ProviderConfiguration {
- @Value("zookeeper://${zookeeper.address:127.0.0.1}:2181")
- private String zookeeperAddress;
-
- @Bean
- public ProviderConfig providerConfig() {
- ProviderConfig providerConfig = new ProviderConfig();
- providerConfig.setTimeout(1000);
- return providerConfig;
- }
-
- @Bean
- public MetadataReportConfig metadataReportConfig() {
- MetadataReportConfig metadataReportConfig = new MetadataReportConfig();
- metadataReportConfig.setAddress(zookeeperAddress);
- return metadataReportConfig;
- }
- }
-
- private static void printServiceData() throws Exception {
- Thread.sleep(3000);
- System.out.println("*********************************************************");
- System.out.println("service metadata:");
- System.out.println(ZkUtil.getMetadata("/dubbo", AnnotationService.class.getName(), "1.1.8", "d-test",
- CommonConstants.PROVIDER_SIDE, "metadatareport-local-annotaion-provider"));
- System.out.println("*********************************************************");
- }
-
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/ZkUtil.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/ZkUtil.java
deleted file mode 100644
index c72d76ff5..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/ZkUtil.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.metadatareport.local.annotation;
-
-import org.apache.dubbo.metadata.report.identifier.KeyTypeEnum;
-import org.apache.dubbo.metadata.report.identifier.MetadataIdentifier;
-
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.curator.retry.ExponentialBackoffRetry;
-
-import static org.apache.dubbo.common.constants.CommonConstants.PATH_SEPARATOR;
-
-public class ZkUtil {
- private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
- private static CuratorFramework client;
-
- static {
- initClient();
- }
-
- public static void initClient() {
- client = CuratorFrameworkFactory.newClient(zookeeperHost + ":2181", 60 * 1000, 60 * 1000,
- new ExponentialBackoffRetry(1000, 3));
- client.start();
- }
-
- public static String getMetadata(String root, String serviceInterface, String version, String group,
- String side, String app) throws Exception {
- String path = getNodePath(root, new MetadataIdentifier(serviceInterface, version, group, side, app));
- return new String(client.getData().forPath(path));
- }
-
- public static String getNodePath(String root, MetadataIdentifier metadataIdentifier) {
- return toRootDir(root) + metadataIdentifier.getUniqueKey(KeyTypeEnum.PATH);
- }
-
- private static String toRootDir(String root) {
- if (root.equals(PATH_SEPARATOR)) {
- return root;
- }
- return root + PATH_SEPARATOR;
- }
-
- private static void removeGlobalConfig() {
- try {
- client.delete().forPath("/dubbo/config/dubbo/dubbo.properties");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/action/AnnotationAction.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/action/AnnotationAction.java
deleted file mode 100644
index 4e9aa5a70..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/action/AnnotationAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.local.annotation.action;
-
-import org.apache.dubbo.config.annotation.DubboReference;
-import org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService;
-
-import org.springframework.stereotype.Component;
-
-@Component("annotationAction")
-public class AnnotationAction {
-
- @DubboReference(version = "1.1.8", group = "d-test", init = true)
- private AnnotationService annotationService;
-
- public String doSayHello(String name) {
- return annotationService.sayHello(name);
- }
-
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/api/AnnotationService.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/api/AnnotationService.java
deleted file mode 100644
index 65910e88e..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/api/AnnotationService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.local.annotation.api;
-
-public interface AnnotationService {
-
- String sayHello(String name);
-
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/impl/AnnotationServiceImpl.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/impl/AnnotationServiceImpl.java
deleted file mode 100644
index 36e3ce88e..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/java/org/apache/dubbo/samples/metadatareport/local/annotation/impl/AnnotationServiceImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.local.annotation.impl;
-
-import org.apache.dubbo.config.annotation.DubboService;
-import org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService;
-
-@DubboService(version = "1.1.8", group = "d-test",timeout = 1000)
-public class AnnotationServiceImpl implements AnnotationService {
-
- @Override
- public String sayHello(String name) {
- System.out.println("received: " + name);
- return "annotation: hello, " + name;
- }
-
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/resources/log4j2.xml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/resources/log4j2.xml
deleted file mode 100644
index 69e1321d2..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT" follow="true">
- <PatternLayout pattern="%style{%d{HH:mm:ss.SSS}}{Magenta} %style{|-}{White}%highlight{%-5p} [%t] %style{%40.40c}{Cyan}:%style{%-3L}{Blue} %style{-|}{White} %m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect)}" disableAnsi="false" charset="UTF-8"/>
- </Console>
- </Appenders>
- <Loggers>
- <Root level="info">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/resources/spring/dubbo-consumer.properties b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/resources/spring/dubbo-consumer.properties
deleted file mode 100644
index 09442d294..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/resources/spring/dubbo-consumer.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-dubbo.registry.address=zookeeper://${zookeeper.address:127.0.0.1}:2181
-dubbo.application.name=metadatareport-local-annotation-consumer
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/resources/spring/dubbo-provider.properties b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/resources/spring/dubbo-provider.properties
deleted file mode 100644
index 39a24886c..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/main/resources/spring/dubbo-provider.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-dubbo.application.name=metadatareport-local-annotaion-provider
-dubbo.registry.address=zookeeper://${zookeeper.address:127.0.0.1}:2181
-dubbo.provider.token=true
\ No newline at end of file
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/test/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataIT.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/test/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataIT.java
deleted file mode 100644
index 08a1f80c3..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotation/src/test/java/org/apache/dubbo/samples/metadatareport/local/annotation/MetadataIT.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.metadatareport.local.annotation;
-
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.metadata.definition.model.FullServiceDefinition;
-import org.apache.dubbo.metadata.definition.model.MethodDefinition;
-import org.apache.dubbo.samples.metadatareport.local.annotation.action.AnnotationAction;
-import org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService;
-
-import com.google.gson.Gson;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-import java.util.List;
-import java.util.Map;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(classes = {MetadataLocalAnnotationConsumer.ConsumerConfiguration.class})
-public class MetadataIT {
- @Autowired
- private AnnotationAction action;
-
- /**
- * <pre>
- * {
- * "parameters": {
- * "side": "provider",
- * "release": "2.7.2",
- * "methods": "sayHello",
- * "deprecated": "false",
- * "dubbo": "2.0.2",
- * "interface": "org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService",
- * "version": "1.1.8",
- * "timeout": "1000",
- * "generic": "false",
- * "revision": "1.1.8",
- * "application": "metadatareport-local-annotaion-provider",
- * "dynamic": "true",
- * "register": null,
- * "bean.name": "ServiceBean:org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService:1.1.8:d-test",
- * "group": "d-test",
- * "anyhost": "true"
- * },
- * "canonicalName": "org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService",
- * "codeSource": "file:/github/dubbo/incubator-dubbo-samples/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-annotaion/target/classes/",
- * "methods": [
- * {
- * "name": "sayHello",
- * "parameterTypes": [
- * "java.lang.String"
- * ],
- * "returnType": "java.lang.String"
- * }
- * ],
- * "types": [
- * {
- * "type": "char"
- * },
- * {
- * "type": "int"
- * },
- * {
- * "type": "java.lang.String",
- * "properties": {
- * "value": {
- * "type": "char[]"
- * },
- * "hash": {
- * "type": "int"
- * }
- * }
- * }
- * ]
- * }
- * </pre>
- */
- @Test
- public void testProviderMetadata() throws Exception {
- String result = ZkUtil.getMetadata("/dubbo", AnnotationService.class.getName(), "1.1.8", "d-test",
- CommonConstants.PROVIDER_SIDE, "metadatareport-local-annotaion-provider");
- Gson gson = new Gson();
- FullServiceDefinition definition = gson.fromJson(result, FullServiceDefinition.class);
- Map<String, String> parameters = definition.getParameters();
- Assert.assertEquals("provider", parameters.get("side"));
- Assert.assertEquals("sayHello", parameters.get("methods"));
- Assert.assertEquals("1000", parameters.get("timeout"));
- Assert.assertEquals("1.1.8", parameters.get("version"));
- Assert.assertEquals("d-test", parameters.get("group"));
- Assert.assertEquals(AnnotationService.class.getCanonicalName(), parameters.get("interface"));
- Assert.assertEquals("false", parameters.get("generic"));
- Assert.assertEquals("metadatareport-local-annotaion-provider", parameters.get("application"));
- Assert.assertEquals("true", parameters.get("dynamic"));
- Assert.assertEquals("true", parameters.get("anyhost"));
- Assert.assertEquals(AnnotationService.class.getCanonicalName(), definition.getCanonicalName());
- List<MethodDefinition> methods = definition.getMethods();
- Assert.assertEquals(1, methods.size());
- MethodDefinition method = methods.get(0);
- Assert.assertEquals("sayHello", method.getName());
- String[] parameterTypes = method.getParameterTypes();
- Assert.assertEquals(1, parameterTypes.length);
- Assert.assertEquals("java.lang.String", parameterTypes[0]);
- Assert.assertEquals("java.lang.String", method.getReturnType());
- }
-
- /**
- * <pre>
- * {
- * "side": "consumer",
- * "application": "metadatareport-local-annotation-consumer",
- * "release": "2.7.2",
- * "methods": "sayHello",
- * "lazy": "false",
- * "sticky": "false",
- * "dubbo": "2.0.2",
- * "interface": "org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService",
- * "version": "1.1.8",
- * "revision": "1.1.8",
- * "group": "d-test"
- * }
- * </pre>
- */
- @Test
- public void testConsumerMetadata() throws Exception {
- //wait for consumer metadata report finish
- Thread.sleep(1000);
-
- String result = ZkUtil.getMetadata("/dubbo", AnnotationService.class.getName(), "1.1.8", "d-test",
- CommonConstants.CONSUMER_SIDE, "metadatareport-local-annotation-consumer");
- Gson gson = new Gson();
- Map<String, String> map = gson.fromJson(result, Map.class);
- Assert.assertEquals("consumer", map.get("side"));
- Assert.assertEquals("metadatareport-local-annotation-consumer", map.get("application"));
- Assert.assertEquals("sayHello", map.get("methods"));
- Assert.assertNull(map.get("lazy"));
- Assert.assertEquals("false", map.get("sticky"));
- Assert.assertEquals("1.1.8", map.get("version"));
- Assert.assertEquals("d-test", map.get("group"));
- Assert.assertEquals(AnnotationService.class.getName(), map.get("interface"));
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/case-configuration.yml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/case-configuration.yml
deleted file mode 100644
index a097dc9fd..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/case-configuration.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from: app-builtin-zookeeper.yml
-
-props:
- project_name: dubbo-samples-metadata-report-local-properties
- main_class: org.apache.dubbo.samples.metadatareport.local.properties.MetadataLocalPropertiesProvider
- zookeeper_port: 2181
- dubbo_port: 20880
-
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/case-versions.conf b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/case-versions.conf
deleted file mode 100644
index f7373a530..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/case-versions.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# Spring app
-dubbo.version=2.7*, 3.*
-spring.version=4.*, 5.*
-java.version= [>= 8]
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/pom.xml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/pom.xml
deleted file mode 100644
index e406db234..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/pom.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- ~
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
-
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>dubbo-samples-metadata-report-local-properties</artifactId>
-
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <dubbo.version>3.2.6</dubbo.version>
- <spring.version>4.3.30.RELEASE</spring.version>
- <log4j2.version>2.20.0</log4j2.version>
- <junit.version>4.13.1</junit.version>
-
- <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-framework-bom</artifactId>
- <version>${spring.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <artifactId>logback-classic</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>logback-core</artifactId>
- <groupId>ch.qos.logback</groupId>
- </exclusion>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <artifactId>slf4j-log4j12</artifactId>
- <groupId>org.slf4j</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper-curator5</artifactId>
- <type>pom</type>
- </dependency>
-
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.10</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <scope>test</scope>
- </dependency>
-
- <!-- Embedded Zookeeper Server Dependencies -->
- <dependency>
- <groupId>io.dropwizard.metrics</groupId>
- <artifactId>metrics-core</artifactId>
- <version>4.1.12.1</version>
- </dependency>
- <dependency>
- <groupId>org.xerial.snappy</groupId>
- <artifactId>snappy-java</artifactId>
- <version>1.1.10.5</version>
- </dependency>
- </dependencies>
-
- <profiles>
- <!-- For jdk 11 above JavaEE annotation -->
- <profile>
- <id>javax.annotation</id>
- <activation>
- <jdk>[1.11,)</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>javax.annotation-api</artifactId>
- <version>1.3.2</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler-plugin.version}</version>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/EmbeddedZooKeeper.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/EmbeddedZooKeeper.java
deleted file mode 100644
index 1d432907e..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/EmbeddedZooKeeper.java
+++ /dev/null
@@ -1,309 +0,0 @@
-
-/*
- * Copyright 2014 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.metadatareport.local.properties;
-
-import org.apache.zookeeper.server.ServerConfig;
-import org.apache.zookeeper.server.ZooKeeperServerMain;
-import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.SmartLifecycle;
-import org.springframework.util.ErrorHandler;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.ServerSocket;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-import java.util.UUID;
-import java.util.stream.Collectors;
-
-/**
- * from: https://github.com/spring-projects/spring-xd/blob/v1.3.1.RELEASE/spring-xd-dirt/src/main/java/org/springframework/xd/dirt/zookeeper/ZooKeeperUtils.java
- * <p>
- * Helper class to start an embedded instance of standalone (non clustered) ZooKeeper.
- * <p>
- * NOTE: at least an external standalone server (if not an ensemble) are recommended, even for
- * {@link org.springframework.xd.dirt.server.singlenode.SingleNodeApplication}
- *
- * @author Patrick Peralta
- * @author Mark Fisher
- * @author David Turanski
- */
-public class EmbeddedZooKeeper implements SmartLifecycle {
-
- private static final Random RANDOM = new Random();
-
- /**
- * Logger.
- */
- private static final Logger logger = LoggerFactory.getLogger(EmbeddedZooKeeper.class);
-
- /**
- * ZooKeeper client port. This will be determined dynamically upon startup.
- */
- private final int clientPort;
-
- /**
- * Whether to auto-start. Default is true.
- */
- private boolean autoStartup = true;
-
- /**
- * Lifecycle phase. Default is 0.
- */
- private int phase = 0;
-
- /**
- * Thread for running the ZooKeeper server.
- */
- private volatile Thread zkServerThread;
-
- /**
- * ZooKeeper server.
- */
- private volatile ZooKeeperServerMain zkServer;
-
- /**
- * {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread.
- */
- private ErrorHandler errorHandler;
-
- private boolean daemon = true;
-
- /**
- * Construct an EmbeddedZooKeeper with a random port.
- */
- public EmbeddedZooKeeper() {
- clientPort = findRandomPort(30000, 65535);
- }
-
- /**
- * Construct an EmbeddedZooKeeper with the provided port.
- *
- * @param clientPort port for ZooKeeper server to bind to
- */
- public EmbeddedZooKeeper(int clientPort, boolean daemon) {
- this.clientPort = clientPort;
- this.daemon = daemon;
- }
-
- /**
- * Returns the port that clients should use to connect to this embedded server.
- *
- * @return dynamically determined client port
- */
- public int getClientPort() {
- return this.clientPort;
- }
-
- /**
- * Specify whether to start automatically. Default is true.
- *
- * @param autoStartup whether to start automatically
- */
- public void setAutoStartup(boolean autoStartup) {
- this.autoStartup = autoStartup;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAutoStartup() {
- return this.autoStartup;
- }
-
- /**
- * Specify the lifecycle phase for the embedded server.
- *
- * @param phase the lifecycle phase
- */
- public void setPhase(int phase) {
- this.phase = phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getPhase() {
- return this.phase;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isRunning() {
- return (zkServerThread != null);
- }
-
- /**
- * Start the ZooKeeper server in a background thread.
- * <p>
- * Register an error handler via {@link #setErrorHandler} in order to handle
- * any exceptions thrown during startup or execution.
- */
- @Override
- public synchronized void start() {
- if (zkServerThread == null) {
- zkServerThread = new Thread(new ServerRunnable(), "ZooKeeper Server Starter");
- zkServerThread.setDaemon(daemon);
- zkServerThread.start();
- }
- }
-
- /**
- * Shutdown the ZooKeeper server.
- */
- @Override
- public synchronized void stop() {
- if (zkServerThread != null) {
- // The shutdown method is protected...thus this hack to invoke it.
- // This will log an exception on shutdown; see
- // https://issues.apache.org/jira/browse/ZOOKEEPER-1873 for details.
- try {
- Method shutdown = ZooKeeperServerMain.class.getDeclaredMethod("shutdown");
- shutdown.setAccessible(true);
- shutdown.invoke(zkServer);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- // It is expected that the thread will exit after
- // the server is shutdown; this will block until
- // the shutdown is complete.
- try {
- zkServerThread.join(5000);
- zkServerThread = null;
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- logger.warn("Interrupted while waiting for embedded ZooKeeper to exit");
- // abandoning zk thread
- zkServerThread = null;
- }
- }
- }
-
- /**
- * Stop the server if running and invoke the callback when complete.
- */
- @Override
- public void stop(Runnable callback) {
- stop();
- callback.run();
- }
-
- /**
- * Provide an {@link ErrorHandler} to be invoked if an Exception is thrown from the ZooKeeper server thread. If none
- * is provided, only error-level logging will occur.
- *
- * @param errorHandler the {@link ErrorHandler} to be invoked
- */
- public void setErrorHandler(ErrorHandler errorHandler) {
- this.errorHandler = errorHandler;
- }
-
- /**
- * Runnable implementation that starts the ZooKeeper server.
- */
- private class ServerRunnable implements Runnable {
-
- @Override
- public void run() {
- try {
- Properties properties = new Properties();
- File file = new File(System.getProperty("java.io.tmpdir")
- + File.separator + UUID.randomUUID());
- file.deleteOnExit();
- properties.setProperty("dataDir", file.getAbsolutePath());
- properties.setProperty("clientPort", String.valueOf(clientPort));
-
- QuorumPeerConfig quorumPeerConfig = new QuorumPeerConfig();
- quorumPeerConfig.parseProperties(properties);
-
- zkServer = new ZooKeeperServerMain();
- ServerConfig configuration = new ServerConfig();
- configuration.readFrom(quorumPeerConfig);
-
- System.setProperty("zookeeper.admin.enableServer", "false");
-
- zkServer.runFromConfig(configuration);
- } catch (Exception e) {
- if (errorHandler != null) {
- errorHandler.handleError(e);
- } else {
- logger.error("Exception running embedded ZooKeeper", e);
- }
- }
- }
- }
-
- /**
- * Workaround for SocketUtils.findRandomPort() deprecation.
- *
- * @param min min port
- * @param max max port
- * @return a random generated available port
- */
- private static int findRandomPort(int min, int max) {
- if (min < 1024) {
- throw new IllegalArgumentException("Max port shouldn't be less than 1024.");
- }
-
- if (max > 65535) {
- throw new IllegalArgumentException("Max port shouldn't be greater than 65535.");
- }
-
- if (min > max) {
- throw new IllegalArgumentException("Min port shouldn't be greater than max port.");
- }
-
- int port = 0;
- int counter = 0;
-
- // Workaround for legacy JDK doesn't support Random.nextInt(min, max).
- List<Integer> randomInts = RANDOM.ints(min, max + 1)
- .limit(max - min)
- .mapToObj(Integer::valueOf)
- .collect(Collectors.toList());
-
- do {
- if (counter > max - min) {
- throw new IllegalStateException("Unable to find a port between " + min + "-" + max);
- }
-
- port = randomInts.get(counter);
- counter++;
- } while (isPortInUse(port));
-
- return port;
- }
-
- private static boolean isPortInUse(int port) {
- try (ServerSocket ignored = new ServerSocket(port)) {
- return false;
- } catch (IOException e) {
- // continue
- }
- return true;
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/MetadataLocalPropertiesConsumer.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/MetadataLocalPropertiesConsumer.java
deleted file mode 100644
index 570e41ee3..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/MetadataLocalPropertiesConsumer.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.local.properties;
-
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.samples.metadatareport.local.properties.api.DemoService;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class MetadataLocalPropertiesConsumer {
-
- public static void main(String[] args) throws Exception {
- ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/metadata-consumer.xml");
- context.start();
-
- DemoService demoService = (DemoService) context.getBean("demoService");
-
- printServiceData();
-
- String hello = demoService.sayHello("world");
- System.out.println(hello);
- }
-
- private static void printServiceData() throws Exception {
- Thread.sleep(3000);
- System.out.println("*********************************************************");
- System.out.println("service metadata:");
- System.out.println(ZkUtil.getMetadata("/dubbo", DemoService.class.getName(), CommonConstants.CONSUMER_SIDE,
- "metadatareport-local-properties-consumer"));
- System.out.println("*********************************************************");
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/MetadataLocalPropertiesProvider.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/MetadataLocalPropertiesProvider.java
deleted file mode 100644
index e7a05ee5d..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/MetadataLocalPropertiesProvider.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.local.properties;
-
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.samples.metadatareport.local.properties.api.DemoService;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.util.concurrent.CountDownLatch;
-
-public class MetadataLocalPropertiesProvider {
-
- public static void main(String[] args) throws Exception {
- new EmbeddedZooKeeper(2181, false).start();
-
- ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/metadata-provider.xml");
- context.start();
-
- printServiceData();
-
- System.out.println("dubbo service started");
- new CountDownLatch(1).await();
- }
-
- private static void printServiceData() throws Exception {
- Thread.sleep(3000);
- System.out.println("*********************************************************");
- System.out.println("service metadata:");
- System.out.println(ZkUtil.getMetadata("/dubbo", DemoService.class.getName(), CommonConstants.PROVIDER_SIDE,
- "metadatareport-local-properties-provider2"));
- System.out.println("*********************************************************");
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/ZkUtil.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/ZkUtil.java
deleted file mode 100644
index 144401bbb..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/ZkUtil.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.samples.metadatareport.local.properties;
-
-import org.apache.dubbo.metadata.report.identifier.KeyTypeEnum;
-import org.apache.dubbo.metadata.report.identifier.MetadataIdentifier;
-
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.framework.CuratorFrameworkFactory;
-import org.apache.curator.retry.ExponentialBackoffRetry;
-
-import static org.apache.dubbo.common.constants.CommonConstants.PATH_SEPARATOR;
-
-public class ZkUtil {
- private static String zookeeperHost = System.getProperty("zookeeper.address", "127.0.0.1");
- private static CuratorFramework client;
-
- static {
- initClient();
- }
-
- public static void initClient() {
- client = CuratorFrameworkFactory.newClient(zookeeperHost + ":2181", 60 * 1000, 60 * 1000,
- new ExponentialBackoffRetry(1000, 3));
- client.start();
- }
-
- public static String getMetadata(String root, String serviceInterface, String side, String app) throws Exception {
- String path = getNodePath(root, new MetadataIdentifier(serviceInterface, null, null, side, app));
- return new String(client.getData().forPath(path));
- }
-
- public static String getNodePath(String root, MetadataIdentifier metadataIdentifier) {
- return toRootDir(root) + metadataIdentifier.getUniqueKey(KeyTypeEnum.PATH);
- }
-
- private static String toRootDir(String root) {
- if (root.equals(PATH_SEPARATOR)) {
- return root;
- }
- return root + PATH_SEPARATOR;
- }
-
- private static void removeGlobalConfig() {
- try {
- client.delete().forPath("/dubbo/config/dubbo/dubbo.properties");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/api/DemoService.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/api/DemoService.java
deleted file mode 100644
index 5da7f8f63..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/api/DemoService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.local.properties.api;
-
-public interface DemoService {
-
- String sayHello(String name);
-
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/impl/DemoServiceImpl.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/impl/DemoServiceImpl.java
deleted file mode 100644
index e87b776d8..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/java/org/apache/dubbo/samples/metadatareport/local/properties/impl/DemoServiceImpl.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.metadatareport.local.properties.impl;
-
-
-import org.apache.dubbo.rpc.RpcContext;
-import org.apache.dubbo.samples.metadatareport.local.properties.api.DemoService;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-public class DemoServiceImpl implements DemoService {
-
- @Override
- public String sayHello(String name) {
- System.out.println("[" + new SimpleDateFormat("HH:mm:ss").format(new Date()) + "] Hello " + name +
- ", request from consumer: " + RpcContext.getContext().getRemoteAddress());
- return "Hello " + name + ", response from provider: " + RpcContext.getContext().getLocalAddress();
- }
-
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/dubbo.properties b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/dubbo.properties
deleted file mode 100644
index ad56b5f48..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/dubbo.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-dubbo.metadata-report.address=zookeeper://127.0.0.1:2181
-dubbo.metadata-report.retry-times=23
-dubbo.metadata-report.retry-period=4590
-dubbo.metadata-report.cycle-report=false
-
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/log4j2.xml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/log4j2.xml
deleted file mode 100644
index 69e1321d2..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/log4j2.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<Configuration status="WARN">
- <Appenders>
- <Console name="Console" target="SYSTEM_OUT" follow="true">
- <PatternLayout pattern="%style{%d{HH:mm:ss.SSS}}{Magenta} %style{|-}{White}%highlight{%-5p} [%t] %style{%40.40c}{Cyan}:%style{%-3L}{Blue} %style{-|}{White} %m%n%rEx{filters(jdk.internal.reflect,java.lang.reflect,sun.reflect)}" disableAnsi="false" charset="UTF-8"/>
- </Console>
- </Appenders>
- <Loggers>
- <Root level="info">
- <AppenderRef ref="Console"/>
- </Root>
- </Loggers>
-</Configuration>
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/spring/metadata-consumer.xml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/spring/metadata-consumer.xml
deleted file mode 100644
index 04a78748b..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/spring/metadata-consumer.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
- xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
- http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
- <context:property-placeholder/>
-
- <dubbo:application name="metadatareport-local-properties-consumer"/>
-
- <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
-
- <dubbo:metadata-report address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
-
- <dubbo:reference id="demoService" init="true"
- interface="org.apache.dubbo.samples.metadatareport.local.properties.api.DemoService"/>
-</beans>
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/spring/metadata-provider.xml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/spring/metadata-provider.xml
deleted file mode 100644
index fbaad9e56..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/main/resources/spring/metadata-provider.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
- xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
- http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
- <context:property-placeholder/>
-
- <dubbo:application name="metadatareport-local-properties-provider2"/>
-
- <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
-
- <dubbo:provider token="true"/>
-
- <dubbo:metadata-report address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
-
- <bean id="demoService" class="org.apache.dubbo.samples.metadatareport.local.properties.impl.DemoServiceImpl"/>
- <dubbo:service interface="org.apache.dubbo.samples.metadatareport.local.properties.api.DemoService"
- ref="demoService"/>
-</beans>
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/test/java/org/apache/dubbo/samples/metadatareport/local/properties/MetadataIT.java b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/test/java/org/apache/dubbo/samples/metadatareport/local/properties/MetadataIT.java
deleted file mode 100644
index 2253f58df..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/src/test/java/org/apache/dubbo/samples/metadatareport/local/properties/MetadataIT.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.dubbo.samples.metadatareport.local.properties;
-
-import org.apache.dubbo.common.constants.CommonConstants;
-import org.apache.dubbo.metadata.definition.model.FullServiceDefinition;
-import org.apache.dubbo.metadata.definition.model.MethodDefinition;
-import org.apache.dubbo.samples.metadatareport.local.properties.api.DemoService;
-
-import com.google.gson.Gson;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-import java.util.List;
-import java.util.Map;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations = {"classpath:/spring/metadata-consumer.xml"})
-public class MetadataIT {
-
- @BeforeClass
- public static void beforeClass() {
- //new EmbeddedZooKeeper(2181, false).start();
- }
-
- @Autowired
- private DemoService demoService;
-
- /**
- * <pre>
- * {
- * "parameters": {
- * "side": "provider",
- * "release": "2.7.2",
- * "methods": "sayHello",
- * "deprecated": "false",
- * "dubbo": "2.0.2",
- * "interface": "org.apache.dubbo.samples.metadatareport.local.properties.api.DemoService",
- * "generic": "false",
- * "async": "true",
- * "application": "metadatareport-local-properties-provider2",
- * "dynamic": "true",
- * "register": null,
- * "bean.name": "org.apache.dubbo.samples.metadatareport.local.properties.api.DemoService",
- * "anyhost": "true"
- * },
- * "canonicalName": "org.apache.dubbo.samples.metadatareport.local.properties.api.DemoService",
- * "codeSource": "file:/github/dubbo/incubator-dubbo-samples/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-properties/target/classes/",
- * "methods": [
- * {
- * "name": "sayHello",
- * "parameterTypes": [
- * "java.lang.String"
- * ],
- * "returnType": "java.lang.String"
- * }
- * ],
- * "types": [
- * {
- * "type": "char"
- * },
- * {
- * "type": "int"
- * },
- * {
- * "type": "java.lang.String",
- * "properties": {
- * "value": {
- * "type": "char[]"
- * },
- * "hash": {
- * "type": "int"
- * }
- * }
- * }
- * ]
- * }
- * </pre>
- */
- @Test
- public void testProviderMetadata() throws Exception {
- String result = ZkUtil.getMetadata("/dubbo", DemoService.class.getName(), CommonConstants.PROVIDER_SIDE,
- "metadatareport-local-properties-provider2");
- Gson gson = new Gson();
- FullServiceDefinition definition = gson.fromJson(result, FullServiceDefinition.class);
- Map<String, String> parameters = definition.getParameters();
- Assert.assertEquals("provider", parameters.get("side"));
- Assert.assertEquals("sayHello", parameters.get("methods"));
- Assert.assertEquals(DemoService.class.getCanonicalName(), parameters.get("interface"));
- Assert.assertEquals("false", parameters.get("generic"));
- Assert.assertEquals("metadatareport-local-properties-provider2", parameters.get("application"));
- Assert.assertEquals("true", parameters.get("dynamic"));
- Assert.assertEquals("true", parameters.get("anyhost"));
- Assert.assertEquals(DemoService.class.getCanonicalName(), definition.getCanonicalName());
- List<MethodDefinition> methods = definition.getMethods();
- Assert.assertEquals(1, methods.size());
- MethodDefinition method = methods.get(0);
- Assert.assertEquals("sayHello", method.getName());
- String[] parameterTypes = method.getParameterTypes();
- Assert.assertEquals(1, parameterTypes.length);
- Assert.assertEquals("java.lang.String", parameterTypes[0]);
- Assert.assertEquals("java.lang.String", method.getReturnType());
- }
-
- /**
- * <pre>
- * {
- * "side": "consumer",
- * "application": "metadatareport-local-properties-consumer",
- * "release": "2.7.2",
- * "methods": "sayHello",
- * "lazy": "false",
- * "sticky": "false",
- * "dubbo": "2.0.2",
- * "interface": "org.apache.dubbo.samples.metadatareport.local.properties.api.DemoService"
- * }
- * </pre>
- */
- @Test
- public void testConsumerMetadata() throws Exception {
-
- //wait for consumer metadata report finish
- Thread.sleep(1000);
-
- String result = ZkUtil.getMetadata("/dubbo", DemoService.class.getName(), CommonConstants.CONSUMER_SIDE,
- "metadatareport-local-properties-consumer");
- Gson gson = new Gson();
- Map<String, String> map = gson.fromJson(result, Map.class);
- Assert.assertEquals("consumer", map.get("side"));
- Assert.assertEquals("metadatareport-local-properties-consumer", map.get("application"));
- Assert.assertEquals("sayHello", map.get("methods"));
- Assert.assertNull(map.get("lazy"));
- Assert.assertEquals("false", map.get("sticky"));
- Assert.assertEquals(DemoService.class.getName(), map.get("interface"));
- }
-}
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/case-configuration.yml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/case-configuration.yml
deleted file mode 100644
index 569853e47..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/case-configuration.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from: app-builtin-zookeeper.yml
-
-props:
- project_name: dubbo-samples-metadata-report-local-xml
- main_class: org.apache.dubbo.samples.metadatareport.local.xml.MetadataLocalXmlProvider
- zookeeper_port: 2181
- dubbo_port: 20880
-
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/case-versions.conf b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/case-versions.conf
deleted file mode 100644
index f7373a530..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/case-versions.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-# Supported component versions of the test case
-
-# Spring app
-dubbo.version=2.7*, 3.*
-spring.version=4.*, 5.*
-java.version= [>= 8]
diff --git a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/pom.xml b/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/pom.xml
deleted file mode 100644
index 762b5646c..000000000
--- a/99-integration/dubbo-samples-metadata-report/dubbo-samples-metadata-report-local-xml/pom.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- ~
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
-
- <modelVersion>4.0.0</modelVersion>
-
... 56656 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org