{"action":"created","comment":{"url":"https://api.github.com/repos/apache/camel/pulls/comments/167392223","pull_request_review_id":95615841,"id":167392223,"diff_hunk":"@@ -36,15 +38,29 @@ protected Endpoint createEndpoint(String uri, String remaining, Map<String, Obje\n         // Set the the required name of the exchange\n         configuration.setName(remaining);\n \n-        // Get the XChange implementation\n-        Class<? extends Exchange> exchangeClass = configuration.getXChangeClass();\n-        Assert.notNull(exchangeClass, \"XChange not supported: \" + configuration.getName());\n-        \n-        // Create the XChange and associated Endpoint\n-        XChange exchange = new XChange(ExchangeFactory.INSTANCE.createExchange(exchangeClass));\n+        XChange exchange = createXChange(configuration);\n         XChangeEndpoint endpoint = new XChangeEndpoint(uri, this, configuration, exchange);\n         \n         return endpoint;\n     }\n \n+    public XChange getXChange() {\n+        return exchange;\n+    }\n+    \n+    private synchronized XChange createXChange(XChangeConfiguration configuration) {","path":"components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeComponent.java","position":29,"original_position":29,"commit_id":"7942c7509994582ba0b09e2d08dba12174db8fc9","original_commit_id":"7942c7509994582ba0b09e2d08dba12174db8fc9","user":{"login":"davsclaus","id":477100,"avatar_url":"https://avatars1.githubusercontent.com/u/477100?v=4","gravatar_id":"","url":"https://api.github.com/users/davsclaus","html_url":"https://github.com/davsclaus","followers_url":"https://api.github.com/users/davsclaus/followers","following_url":"https://api.github.com/users/davsclaus/following{/other_user}","gists_url":"https://api.github.com/users/davsclaus/gists{/gist_id}","starred_url":"https://api.github.com/users/davsclaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davsclaus/subscriptions","organizations_url":"https://api.github.com/users/davsclaus/orgs","repos_url":"https://api.github.com/users/davsclaus/repos","events_url":"https://api.github.com/users/davsclaus/events{/privacy}","received_events_url":"https://api.github.com/users/davsclaus/received_events","type":"User","site_admin":false},"body":"Its better to do this in doStart so you dont need synchronized code blocks","created_at":"2018-02-10T07:44:55Z","updated_at":"2018-02-10T07:45:25Z","html_url":"https://github.com/apache/camel/pull/2216#discussion_r167392223","pull_request_url":"https://api.github.com/repos/apache/camel/pulls/2216","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/camel/pulls/comments/167392223"},"html":{"href":"https://github.com/apache/camel/pull/2216#discussion_r167392223"},"pull_request":{"href":"https://api.github.com/repos/apache/camel/pulls/2216"}}},"pull_request":{"url":"https://api.github.com/repos/apache/camel/pulls/2216","id":168242214,"html_url":"https://github.com/apache/camel/pull/2216","diff_url":"https://github.com/apache/camel/pull/2216.diff","patch_url":"https://github.com/apache/camel/pull/2216.patch","issue_url":"https://api.github.com/repos/apache/camel/issues/2216","number":2216,"state":"open","locked":false,"title":"[XChange] Add initial support for account management","user":{"login":"tdiesler","id":244946,"avatar_url":"https://avatars1.githubusercontent.com/u/244946?v=4","gravatar_id":"","url":"https://api.github.com/users/tdiesler","html_url":"https://github.com/tdiesler","followers_url":"https://api.github.com/users/tdiesler/followers","following_url":"https://api.github.com/users/tdiesler/following{/other_user}","gists_url":"https://api.github.com/users/tdiesler/gists{/gist_id}","starred_url":"https://api.github.com/users/tdiesler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdiesler/subscriptions","organizations_url":"https://api.github.com/users/tdiesler/orgs","repos_url":"https://api.github.com/users/tdiesler/repos","events_url":"https://api.github.com/users/tdiesler/events{/privacy}","received_events_url":"https://api.github.com/users/tdiesler/received_events","type":"User","site_admin":false},"body":"Resolves CAMEL-12170","created_at":"2018-02-09T13:40:24Z","updated_at":"2018-02-10T07:45:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c07a491eafa6687f32721548ad4056ec085739d1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/camel/pulls/2216/commits","review_comments_url":"https://api.github.com/repos/apache/camel/pulls/2216/comments","review_comment_url":"https://api.github.com/repos/apache/camel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/camel/issues/2216/comments","statuses_url":"https://api.github.com/repos/apache/camel/statuses/7942c7509994582ba0b09e2d08dba12174db8fc9","head":{"label":"tdiesler:CAMEL-12170","ref":"CAMEL-12170","sha":"7942c7509994582ba0b09e2d08dba12174db8fc9","user":{"login":"tdiesler","id":244946,"avatar_url":"https://avatars1.githubusercontent.com/u/244946?v=4","gravatar_id":"","url":"https://api.github.com/users/tdiesler","html_url":"https://github.com/tdiesler","followers_url":"https://api.github.com/users/tdiesler/followers","following_url":"https://api.github.com/users/tdiesler/following{/other_user}","gists_url":"https://api.github.com/users/tdiesler/gists{/gist_id}","starred_url":"https://api.github.com/users/tdiesler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdiesler/subscriptions","organizations_url":"https://api.github.com/users/tdiesler/orgs","repos_url":"https://api.github.com/users/tdiesler/repos","events_url":"https://api.github.com/users/tdiesler/events{/privacy}","received_events_url":"https://api.github.com/users/tdiesler/received_events","type":"User","site_admin":false},"repo":{"id":9475246,"name":"camel","full_name":"tdiesler/camel","owner":{"login":"tdiesler","id":244946,"avatar_url":"https://avatars1.githubusercontent.com/u/244946?v=4","gravatar_id":"","url":"https://api.github.com/users/tdiesler","html_url":"https://github.com/tdiesler","followers_url":"https://api.github.com/users/tdiesler/followers","following_url":"https://api.github.com/users/tdiesler/following{/other_user}","gists_url":"https://api.github.com/users/tdiesler/gists{/gist_id}","starred_url":"https://api.github.com/users/tdiesler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdiesler/subscriptions","organizations_url":"https://api.github.com/users/tdiesler/orgs","repos_url":"https://api.github.com/users/tdiesler/repos","events_url":"https://api.github.com/users/tdiesler/events{/privacy}","received_events_url":"https://api.github.com/users/tdiesler/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tdiesler/camel","description":"Mirror of Apache Camel","fork":true,"url":"https://api.github.com/repos/tdiesler/camel","forks_url":"https://api.github.com/repos/tdiesler/camel/forks","keys_url":"https://api.github.com/repos/tdiesler/camel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tdiesler/camel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tdiesler/camel/teams","hooks_url":"https://api.github.com/repos/tdiesler/camel/hooks","issue_events_url":"https://api.github.com/repos/tdiesler/camel/issues/events{/number}","events_url":"https://api.github.com/repos/tdiesler/camel/events","assignees_url":"https://api.github.com/repos/tdiesler/camel/assignees{/user}","branches_url":"https://api.github.com/repos/tdiesler/camel/branches{/branch}","tags_url":"https://api.github.com/repos/tdiesler/camel/tags","blobs_url":"https://api.github.com/repos/tdiesler/camel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tdiesler/camel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tdiesler/camel/git/refs{/sha}","trees_url":"https://api.github.com/repos/tdiesler/camel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tdiesler/camel/statuses/{sha}","languages_url":"https://api.github.com/repos/tdiesler/camel/languages","stargazers_url":"https://api.github.com/repos/tdiesler/camel/stargazers","contributors_url":"https://api.github.com/repos/tdiesler/camel/contributors","subscribers_url":"https://api.github.com/repos/tdiesler/camel/subscribers","subscription_url":"https://api.github.com/repos/tdiesler/camel/subscription","commits_url":"https://api.github.com/repos/tdiesler/camel/commits{/sha}","git_commits_url":"https://api.github.com/repos/tdiesler/camel/git/commits{/sha}","comments_url":"https://api.github.com/repos/tdiesler/camel/comments{/number}","issue_comment_url":"https://api.github.com/repos/tdiesler/camel/issues/comments{/number}","contents_url":"https://api.github.com/repos/tdiesler/camel/contents/{+path}","compare_url":"https://api.github.com/repos/tdiesler/camel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tdiesler/camel/merges","archive_url":"https://api.github.com/repos/tdiesler/camel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tdiesler/camel/downloads","issues_url":"https://api.github.com/repos/tdiesler/camel/issues{/number}","pulls_url":"https://api.github.com/repos/tdiesler/camel/pulls{/number}","milestones_url":"https://api.github.com/repos/tdiesler/camel/milestones{/number}","notifications_url":"https://api.github.com/repos/tdiesler/camel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tdiesler/camel/labels{/name}","releases_url":"https://api.github.com/repos/tdiesler/camel/releases{/id}","deployments_url":"https://api.github.com/repos/tdiesler/camel/deployments","created_at":"2013-04-16T15:03:49Z","updated_at":"2015-05-27T11:52:26Z","pushed_at":"2018-02-09T13:40:05Z","git_url":"git://github.com/tdiesler/camel.git","ssh_url":"git@github.com:tdiesler/camel.git","clone_url":"https://github.com/tdiesler/camel.git","svn_url":"https://github.com/tdiesler/camel","homepage":null,"size":157652,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"66cbe09d8f847e6f470afdd0799523566003b0ac","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":206317,"name":"camel","full_name":"apache/camel","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/camel","description":"Apache Camel","fork":false,"url":"https://api.github.com/repos/apache/camel","forks_url":"https://api.github.com/repos/apache/camel/forks","keys_url":"https://api.github.com/repos/apache/camel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/camel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/camel/teams","hooks_url":"https://api.github.com/repos/apache/camel/hooks","issue_events_url":"https://api.github.com/repos/apache/camel/issues/events{/number}","events_url":"https://api.github.com/repos/apache/camel/events","assignees_url":"https://api.github.com/repos/apache/camel/assignees{/user}","branches_url":"https://api.github.com/repos/apache/camel/branches{/branch}","tags_url":"https://api.github.com/repos/apache/camel/tags","blobs_url":"https://api.github.com/repos/apache/camel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/camel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/camel/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/camel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/camel/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/camel/languages","stargazers_url":"https://api.github.com/repos/apache/camel/stargazers","contributors_url":"https://api.github.com/repos/apache/camel/contributors","subscribers_url":"https://api.github.com/repos/apache/camel/subscribers","subscription_url":"https://api.github.com/repos/apache/camel/subscription","commits_url":"https://api.github.com/repos/apache/camel/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/camel/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/camel/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/camel/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/camel/contents/{+path}","compare_url":"https://api.github.com/repos/apache/camel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/camel/merges","archive_url":"https://api.github.com/repos/apache/camel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/camel/downloads","issues_url":"https://api.github.com/repos/apache/camel/issues{/number}","pulls_url":"https://api.github.com/repos/apache/camel/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/camel/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/camel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/camel/labels{/name}","releases_url":"https://api.github.com/repos/apache/camel/releases{/id}","deployments_url":"https://api.github.com/repos/apache/camel/deployments","created_at":"2009-05-21T00:25:36Z","updated_at":"2018-02-09T04:57:22Z","pushed_at":"2018-02-10T06:47:48Z","git_url":"git://github.com/apache/camel.git","ssh_url":"git@github.com:apache/camel.git","clone_url":"https://github.com/apache/camel.git","svn_url":"https://github.com/apache/camel","homepage":"https://camel.apache.org/","size":195497,"stargazers_count":1665,"watchers_count":1665,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2448,"mirror_url":null,"archived":false,"open_issues_count":16,"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":2448,"open_issues":16,"watchers":1665,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/camel/pulls/2216"},"html":{"href":"https://github.com/apache/camel/pull/2216"},"issue":{"href":"https://api.github.com/repos/apache/camel/issues/2216"},"comments":{"href":"https://api.github.com/repos/apache/camel/issues/2216/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/camel/pulls/2216/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/camel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/camel/pulls/2216/commits"},"statuses":{"href":"https://api.github.com/repos/apache/camel/statuses/7942c7509994582ba0b09e2d08dba12174db8fc9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"davsclaus"}}