{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-dubbo/pulls/comments/190509907","pull_request_review_id":122897396,"id":190509907,"diff_hunk":"@@ -71,6 +71,8 @@\n         legacyProperties.put(\"dubbo.consumer.retries\", \"dubbo.service.max.retry.providers\");\r\n         legacyProperties.put(\"dubbo.consumer.check\", \"dubbo.service.allow.no.provider\");\r\n         legacyProperties.put(\"dubbo.service.url\", \"dubbo.service.address\");\r\n+\r\n+        Runtime.getRuntime().addShutdownHook(DubboShutdownHook.getDubboShutdownHook());\r","path":"dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/AbstractConfig.java","position":null,"original_position":5,"commit_id":"4531f208da4c2092833aa27a84638350f3a7880d","original_commit_id":"1f0702b176e1d6a327c6488241242e613e323e21","user":{"login":"zonghaishang","id":15549777,"avatar_url":"https://avatars0.githubusercontent.com/u/15549777?v=4","gravatar_id":"","url":"https://api.github.com/users/zonghaishang","html_url":"https://github.com/zonghaishang","followers_url":"https://api.github.com/users/zonghaishang/followers","following_url":"https://api.github.com/users/zonghaishang/following{/other_user}","gists_url":"https://api.github.com/users/zonghaishang/gists{/gist_id}","starred_url":"https://api.github.com/users/zonghaishang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zonghaishang/subscriptions","organizations_url":"https://api.github.com/users/zonghaishang/orgs","repos_url":"https://api.github.com/users/zonghaishang/repos","events_url":"https://api.github.com/users/zonghaishang/events{/privacy}","received_events_url":"https://api.github.com/users/zonghaishang/received_events","type":"User","site_admin":false},"body":"This will lead to the coexistence of spring hooks，If the spring hook destroys the context before dubbo, the user code uses the aop feature, or calls the getBean method, dubbo gracefully shutdown and reports that the bean was not found.\r\nOnly dubbo hooks are registered in non-spring containers.","created_at":"2018-05-24T08:52:39Z","updated_at":"2018-05-24T08:53:24Z","html_url":"https://github.com/apache/incubator-dubbo/pull/1820#discussion_r190509907","pull_request_url":"https://api.github.com/repos/apache/incubator-dubbo/pulls/1820","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-dubbo/pulls/comments/190509907"},"html":{"href":"https://github.com/apache/incubator-dubbo/pull/1820#discussion_r190509907"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-dubbo/pulls/1820"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-dubbo/pulls/1820","id":189223767,"html_url":"https://github.com/apache/incubator-dubbo/pull/1820","diff_url":"https://github.com/apache/incubator-dubbo/pull/1820.diff","patch_url":"https://github.com/apache/incubator-dubbo/pull/1820.patch","issue_url":"https://api.github.com/repos/apache/incubator-dubbo/issues/1820","number":1820,"state":"open","locked":false,"title":"Improve graceful shutdown","user":{"login":"ralf0131","id":4397305,"avatar_url":"https://avatars1.githubusercontent.com/u/4397305?v=4","gravatar_id":"","url":"https://api.github.com/users/ralf0131","html_url":"https://github.com/ralf0131","followers_url":"https://api.github.com/users/ralf0131/followers","following_url":"https://api.github.com/users/ralf0131/following{/other_user}","gists_url":"https://api.github.com/users/ralf0131/gists{/gist_id}","starred_url":"https://api.github.com/users/ralf0131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralf0131/subscriptions","organizations_url":"https://api.github.com/users/ralf0131/orgs","repos_url":"https://api.github.com/users/ralf0131/repos","events_url":"https://api.github.com/users/ralf0131/events{/privacy}","received_events_url":"https://api.github.com/users/ralf0131/received_events","type":"User","site_admin":false},"body":"## What is the purpose of the change\r\n\r\nImprove compatibility for graceful shutdown.\r\nThe implementation fo #1763 lack consideration for compatibility.\r\n\r\n## Brief changelog\r\n\r\n* Create a dedicated class DubboShutdownHook, and make it singleton.\r\n* Restore ProtocolConfig#destroyAll() for compatabitility.\r\n* Register DubboShutdownHook in static initialization of AbstractConfig.\r\n\r\n## Verifying this change\r\n\r\nUnit test passed.\r\n\r\nFollow this checklist to help us incorporate your contribution quickly and easily:\r\n\r\n- [x] Make sure there is a [GITHUB_issue](https://github.com/apache/incubator-dubbo/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.\r\n- [ ] Format the pull request title like `[Dubbo-XXX] Fix UnknownException when host config not exist #XXX`. Each commit in the pull request should have a meaningful subject line and body.\r\n- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.\r\n- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/alibaba/dubbo/tree/master/dubbo-test).\r\n- [x] Run `mvn clean install -DskipTests` & `mvn clean test-compile failsafe:integration-test` to make sure unit-test and integration-test pass.\r\n- [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).\r\n","created_at":"2018-05-20T08:04:43Z","updated_at":"2018-05-24T08:53:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ebc4244e23704f373ffc116763ecda905ce4e2d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-dubbo/pulls/1820/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-dubbo/pulls/1820/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-dubbo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-dubbo/issues/1820/comments","statuses_url":"https://api.github.com/repos/apache/incubator-dubbo/statuses/4531f208da4c2092833aa27a84638350f3a7880d","head":{"label":"ralf0131:improve-graceful-shutdown","ref":"improve-graceful-shutdown","sha":"4531f208da4c2092833aa27a84638350f3a7880d","user":{"login":"ralf0131","id":4397305,"avatar_url":"https://avatars1.githubusercontent.com/u/4397305?v=4","gravatar_id":"","url":"https://api.github.com/users/ralf0131","html_url":"https://github.com/ralf0131","followers_url":"https://api.github.com/users/ralf0131/followers","following_url":"https://api.github.com/users/ralf0131/following{/other_user}","gists_url":"https://api.github.com/users/ralf0131/gists{/gist_id}","starred_url":"https://api.github.com/users/ralf0131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralf0131/subscriptions","organizations_url":"https://api.github.com/users/ralf0131/orgs","repos_url":"https://api.github.com/users/ralf0131/repos","events_url":"https://api.github.com/users/ralf0131/events{/privacy}","received_events_url":"https://api.github.com/users/ralf0131/received_events","type":"User","site_admin":false},"repo":{"id":119020526,"name":"dubbo","full_name":"ralf0131/dubbo","owner":{"login":"ralf0131","id":4397305,"avatar_url":"https://avatars1.githubusercontent.com/u/4397305?v=4","gravatar_id":"","url":"https://api.github.com/users/ralf0131","html_url":"https://github.com/ralf0131","followers_url":"https://api.github.com/users/ralf0131/followers","following_url":"https://api.github.com/users/ralf0131/following{/other_user}","gists_url":"https://api.github.com/users/ralf0131/gists{/gist_id}","starred_url":"https://api.github.com/users/ralf0131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralf0131/subscriptions","organizations_url":"https://api.github.com/users/ralf0131/orgs","repos_url":"https://api.github.com/users/ralf0131/repos","events_url":"https://api.github.com/users/ralf0131/events{/privacy}","received_events_url":"https://api.github.com/users/ralf0131/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ralf0131/dubbo","description":"Dubbo is a high-performance, java based, open source RPC framework","fork":true,"url":"https://api.github.com/repos/ralf0131/dubbo","forks_url":"https://api.github.com/repos/ralf0131/dubbo/forks","keys_url":"https://api.github.com/repos/ralf0131/dubbo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ralf0131/dubbo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ralf0131/dubbo/teams","hooks_url":"https://api.github.com/repos/ralf0131/dubbo/hooks","issue_events_url":"https://api.github.com/repos/ralf0131/dubbo/issues/events{/number}","events_url":"https://api.github.com/repos/ralf0131/dubbo/events","assignees_url":"https://api.github.com/repos/ralf0131/dubbo/assignees{/user}","branches_url":"https://api.github.com/repos/ralf0131/dubbo/branches{/branch}","tags_url":"https://api.github.com/repos/ralf0131/dubbo/tags","blobs_url":"https://api.github.com/repos/ralf0131/dubbo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ralf0131/dubbo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ralf0131/dubbo/git/refs{/sha}","trees_url":"https://api.github.com/repos/ralf0131/dubbo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ralf0131/dubbo/statuses/{sha}","languages_url":"https://api.github.com/repos/ralf0131/dubbo/languages","stargazers_url":"https://api.github.com/repos/ralf0131/dubbo/stargazers","contributors_url":"https://api.github.com/repos/ralf0131/dubbo/contributors","subscribers_url":"https://api.github.com/repos/ralf0131/dubbo/subscribers","subscription_url":"https://api.github.com/repos/ralf0131/dubbo/subscription","commits_url":"https://api.github.com/repos/ralf0131/dubbo/commits{/sha}","git_commits_url":"https://api.github.com/repos/ralf0131/dubbo/git/commits{/sha}","comments_url":"https://api.github.com/repos/ralf0131/dubbo/comments{/number}","issue_comment_url":"https://api.github.com/repos/ralf0131/dubbo/issues/comments{/number}","contents_url":"https://api.github.com/repos/ralf0131/dubbo/contents/{+path}","compare_url":"https://api.github.com/repos/ralf0131/dubbo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ralf0131/dubbo/merges","archive_url":"https://api.github.com/repos/ralf0131/dubbo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ralf0131/dubbo/downloads","issues_url":"https://api.github.com/repos/ralf0131/dubbo/issues{/number}","pulls_url":"https://api.github.com/repos/ralf0131/dubbo/pulls{/number}","milestones_url":"https://api.github.com/repos/ralf0131/dubbo/milestones{/number}","notifications_url":"https://api.github.com/repos/ralf0131/dubbo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ralf0131/dubbo/labels{/name}","releases_url":"https://api.github.com/repos/ralf0131/dubbo/releases{/id}","deployments_url":"https://api.github.com/repos/ralf0131/dubbo/deployments","created_at":"2018-01-26T07:33:27Z","updated_at":"2018-04-21T06:38:28Z","pushed_at":"2018-05-24T08:32:58Z","git_url":"git://github.com/ralf0131/dubbo.git","ssh_url":"git@github.com:ralf0131/dubbo.git","clone_url":"https://github.com/ralf0131/dubbo.git","svn_url":"https://github.com/ralf0131/dubbo","homepage":"http://dubbo.io","size":9976,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"5a3b1553dda84dc6e73e918bb6e025764d8c9a63","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":4710920,"name":"incubator-dubbo","full_name":"apache/incubator-dubbo","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-dubbo","description":"Apache Dubbo (incubating) is a high-performance, java based, open source RPC framework.","fork":false,"url":"https://api.github.com/repos/apache/incubator-dubbo","forks_url":"https://api.github.com/repos/apache/incubator-dubbo/forks","keys_url":"https://api.github.com/repos/apache/incubator-dubbo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-dubbo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-dubbo/teams","hooks_url":"https://api.github.com/repos/apache/incubator-dubbo/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-dubbo/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-dubbo/events","assignees_url":"https://api.github.com/repos/apache/incubator-dubbo/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-dubbo/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-dubbo/tags","blobs_url":"https://api.github.com/repos/apache/incubator-dubbo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-dubbo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-dubbo/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-dubbo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-dubbo/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-dubbo/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-dubbo/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-dubbo/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-dubbo/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-dubbo/subscription","commits_url":"https://api.github.com/repos/apache/incubator-dubbo/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-dubbo/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-dubbo/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-dubbo/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-dubbo/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-dubbo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-dubbo/merges","archive_url":"https://api.github.com/repos/apache/incubator-dubbo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-dubbo/downloads","issues_url":"https://api.github.com/repos/apache/incubator-dubbo/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-dubbo/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-dubbo/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-dubbo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-dubbo/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-dubbo/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-dubbo/deployments","created_at":"2012-06-19T07:56:02Z","updated_at":"2018-05-24T08:26:24Z","pushed_at":"2018-05-24T08:33:00Z","git_url":"git://github.com/apache/incubator-dubbo.git","ssh_url":"git@github.com:apache/incubator-dubbo.git","clone_url":"https://github.com/apache/incubator-dubbo.git","svn_url":"https://github.com/apache/incubator-dubbo","homepage":"http://dubbo.incubator.apache.org","size":10139,"stargazers_count":18994,"watchers_count":18994,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13356,"mirror_url":null,"archived":false,"open_issues_count":430,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":13356,"open_issues":430,"watchers":18994,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-dubbo/pulls/1820"},"html":{"href":"https://github.com/apache/incubator-dubbo/pull/1820"},"issue":{"href":"https://api.github.com/repos/apache/incubator-dubbo/issues/1820"},"comments":{"href":"https://api.github.com/repos/apache/incubator-dubbo/issues/1820/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-dubbo/pulls/1820/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-dubbo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-dubbo/pulls/1820/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-dubbo/statuses/4531f208da4c2092833aa27a84638350f3a7880d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"zonghaishang"}}