{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/repose/pulls/comments/43033077","id":43033077,"diff_hunk":"@@ -71,26 +74,49 @@ public AkkaServiceClientImpl(HttpClientService httpClientService) {\n         quickFutureCache = CacheBuilder.newBuilder()\n                 .expireAfterWrite(FUTURE_CACHE_TTL, FUTURE_CACHE_UNIT)\n                 .build();\n+    }\n+\n+    @PreDestroy\n+    public void destroy() {\n+        // tie this actor system to our bean lifecycle\n+        actorSystem.shutdown();\n+    }\n \n+    @Override\n+    public void setConnectionPoolId(String connectionPoolId) {\n+        if (StringUtils.equals(this.connectionPoolId, connectionPoolId)) {\n+            return;\n+        }\n \n-        tokenActorRef = actorSystem.actorOf(new Props(new UntypedActorFactory() {\n-            public UntypedActor create() {\n+        ActorRef oldTokenActorRef = tokenActorRef;\n+        this.connectionPoolId = connectionPoolId;\n+        createTokenActor(FORCE_CREATE);\n \n-                return new AuthTokenFutureActor(serviceClient);\n-            }\n-        }).withRouter(new RoundRobinRouter(numberOfActors)), \"authRequestRouter\");\n+        if (oldTokenActorRef != null) {\n+            actorSystem.stop(oldTokenActorRef);\n+        }\n     }\n \n+    private synchronized void createTokenActor(ForceCreate forceCreate) {","path":"repose-aggregator/services/service-client/impl/src/main/java/org/openrepose/core/services/serviceclient/akka/impl/AkkaServiceClientImpl.java","position":69,"original_position":69,"commit_id":"f37848165441927400d2f04d00a9e8985d9c7777","original_commit_id":"f37848165441927400d2f04d00a9e8985d9c7777","user":{"login":"Mario-Lopez","id":6766560,"avatar_url":"https://avatars.githubusercontent.com/u/6766560?v=3","gravatar_id":"","url":"https://api.github.com/users/Mario-Lopez","html_url":"https://github.com/Mario-Lopez","followers_url":"https://api.github.com/users/Mario-Lopez/followers","following_url":"https://api.github.com/users/Mario-Lopez/following{/other_user}","gists_url":"https://api.github.com/users/Mario-Lopez/gists{/gist_id}","starred_url":"https://api.github.com/users/Mario-Lopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mario-Lopez/subscriptions","organizations_url":"https://api.github.com/users/Mario-Lopez/orgs","repos_url":"https://api.github.com/users/Mario-Lopez/repos","events_url":"https://api.github.com/users/Mario-Lopez/events{/privacy}","received_events_url":"https://api.github.com/users/Mario-Lopez/received_events","type":"User","site_admin":false},"body":"I will show you what I got.","created_at":"2015-10-26T18:29:28Z","updated_at":"2015-10-26T18:29:28Z","html_url":"https://github.com/rackerlabs/repose/pull/1405#discussion_r43033077","pull_request_url":"https://api.github.com/repos/rackerlabs/repose/pulls/1405","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/comments/43033077"},"html":{"href":"https://github.com/rackerlabs/repose/pull/1405#discussion_r43033077"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/1405"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/repose/pulls/1405","id":48692911,"html_url":"https://github.com/rackerlabs/repose/pull/1405","diff_url":"https://github.com/rackerlabs/repose/pull/1405.diff","patch_url":"https://github.com/rackerlabs/repose/pull/1405.patch","issue_url":"https://api.github.com/repos/rackerlabs/repose/issues/1405","number":1405,"state":"open","locked":false,"title":"AkkaServiceClient - Connection pool ID","user":{"login":"Mario-Lopez","id":6766560,"avatar_url":"https://avatars.githubusercontent.com/u/6766560?v=3","gravatar_id":"","url":"https://api.github.com/users/Mario-Lopez","html_url":"https://github.com/Mario-Lopez","followers_url":"https://api.github.com/users/Mario-Lopez/followers","following_url":"https://api.github.com/users/Mario-Lopez/following{/other_user}","gists_url":"https://api.github.com/users/Mario-Lopez/gists{/gist_id}","starred_url":"https://api.github.com/users/Mario-Lopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mario-Lopez/subscriptions","organizations_url":"https://api.github.com/users/Mario-Lopez/orgs","repos_url":"https://api.github.com/users/Mario-Lopez/repos","events_url":"https://api.github.com/users/Mario-Lopez/events{/privacy}","received_events_url":"https://api.github.com/users/Mario-Lopez/received_events","type":"User","site_admin":false},"body":"Added ability to set a connection pool ID in the AkkaServiceClient.\r\n\r\nIf none is specified, the old behavior is used, so this update is backwards compatible.","created_at":"2015-10-26T00:44:25Z","updated_at":"2015-10-26T18:29:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d63a3d48561b2b7f438948f1bec9a7ea3acf12b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/repose/pulls/1405/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/repose/pulls/1405/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/repose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackerlabs/repose/issues/1405/comments","statuses_url":"https://api.github.com/repos/rackerlabs/repose/statuses/f37848165441927400d2f04d00a9e8985d9c7777","head":{"label":"rackerlabs:REP-2500_AkkaServiceClient_conn_pool","ref":"REP-2500_AkkaServiceClient_conn_pool","sha":"f37848165441927400d2f04d00a9e8985d9c7777","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":1981821,"name":"repose","full_name":"rackerlabs/repose","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/repose","description":"The powerful, programmable, API Middleware Platform","fork":false,"url":"https://api.github.com/repos/rackerlabs/repose","forks_url":"https://api.github.com/repos/rackerlabs/repose/forks","keys_url":"https://api.github.com/repos/rackerlabs/repose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/repose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/repose/teams","hooks_url":"https://api.github.com/repos/rackerlabs/repose/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/repose/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/repose/events","assignees_url":"https://api.github.com/repos/rackerlabs/repose/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/repose/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/repose/tags","blobs_url":"https://api.github.com/repos/rackerlabs/repose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/repose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/repose/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/repose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/repose/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/repose/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/repose/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/repose/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/repose/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/repose/subscription","commits_url":"https://api.github.com/repos/rackerlabs/repose/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/repose/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/repose/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/repose/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/repose/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/repose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/repose/merges","archive_url":"https://api.github.com/repos/rackerlabs/repose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/repose/downloads","issues_url":"https://api.github.com/repos/rackerlabs/repose/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/repose/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/repose/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/repose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/repose/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/repose/releases{/id}","created_at":"2011-07-01T04:39:34Z","updated_at":"2015-10-20T13:12:42Z","pushed_at":"2015-10-26T18:25:01Z","git_url":"git://github.com/rackerlabs/repose.git","ssh_url":"git@github.com:rackerlabs/repose.git","clone_url":"https://github.com/rackerlabs/repose.git","svn_url":"https://github.com/rackerlabs/repose","homepage":"http://www.openrepose.org/","size":120534,"stargazers_count":221,"watchers_count":221,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":61,"mirror_url":null,"open_issues_count":15,"forks":61,"open_issues":15,"watchers":221,"default_branch":"master"}},"base":{"label":"rackerlabs:master","ref":"master","sha":"5e53e2df0b349784fb6725cd621826f2e5a73317","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":1981821,"name":"repose","full_name":"rackerlabs/repose","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/repose","description":"The powerful, programmable, API Middleware Platform","fork":false,"url":"https://api.github.com/repos/rackerlabs/repose","forks_url":"https://api.github.com/repos/rackerlabs/repose/forks","keys_url":"https://api.github.com/repos/rackerlabs/repose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/repose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/repose/teams","hooks_url":"https://api.github.com/repos/rackerlabs/repose/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/repose/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/repose/events","assignees_url":"https://api.github.com/repos/rackerlabs/repose/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/repose/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/repose/tags","blobs_url":"https://api.github.com/repos/rackerlabs/repose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/repose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/repose/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/repose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/repose/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/repose/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/repose/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/repose/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/repose/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/repose/subscription","commits_url":"https://api.github.com/repos/rackerlabs/repose/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/repose/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/repose/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/repose/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/repose/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/repose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/repose/merges","archive_url":"https://api.github.com/repos/rackerlabs/repose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/repose/downloads","issues_url":"https://api.github.com/repos/rackerlabs/repose/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/repose/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/repose/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/repose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/repose/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/repose/releases{/id}","created_at":"2011-07-01T04:39:34Z","updated_at":"2015-10-20T13:12:42Z","pushed_at":"2015-10-26T18:25:01Z","git_url":"git://github.com/rackerlabs/repose.git","ssh_url":"git@github.com:rackerlabs/repose.git","clone_url":"https://github.com/rackerlabs/repose.git","svn_url":"https://github.com/rackerlabs/repose","homepage":"http://www.openrepose.org/","size":120534,"stargazers_count":221,"watchers_count":221,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":61,"mirror_url":null,"open_issues_count":15,"forks":61,"open_issues":15,"watchers":221,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/1405"},"html":{"href":"https://github.com/rackerlabs/repose/pull/1405"},"issue":{"href":"https://api.github.com/repos/rackerlabs/repose/issues/1405"},"comments":{"href":"https://api.github.com/repos/rackerlabs/repose/issues/1405/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/1405/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/repose/pulls/1405/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/repose/statuses/f37848165441927400d2f04d00a9e8985d9c7777"}}}}