{"action":"created","comment":{"url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/comments/66630145","id":66630145,"diff_hunk":"@@ -547,13 +569,11 @@ private String getPatientDiscoveryMessageCommunityId(\n \n     protected Session getSession() {\n         Session session = null;\n-        SessionFactory fact = HibernateUtil.getSessionFactory();\n-        if (fact != null) {\n-            session = fact.openSession();\n+        if (HibernateUtilFactory.getAsyncMsgsHibernateUtil() != null) {","path":"Product/Production/Common/CONNECTCoreLib/src/main/java/gov/hhs/fha/nhinc/async/AsyncMessageProcessHelper.java","position":209,"original_position":209,"commit_id":"39119c6b1b6ab5540538ba620423314a520226d5","original_commit_id":"39119c6b1b6ab5540538ba620423314a520226d5","user":{"login":"mhpnguyen","id":16296754,"avatar_url":"https://avatars.githubusercontent.com/u/16296754?v=3","gravatar_id":"","url":"https://api.github.com/users/mhpnguyen","html_url":"https://github.com/mhpnguyen","followers_url":"https://api.github.com/users/mhpnguyen/followers","following_url":"https://api.github.com/users/mhpnguyen/following{/other_user}","gists_url":"https://api.github.com/users/mhpnguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/mhpnguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhpnguyen/subscriptions","organizations_url":"https://api.github.com/users/mhpnguyen/orgs","repos_url":"https://api.github.com/users/mhpnguyen/repos","events_url":"https://api.github.com/users/mhpnguyen/events{/privacy}","received_events_url":"https://api.github.com/users/mhpnguyen/received_events","type":"User","site_admin":false},"body":"HibernateUtilFactory.getAsyncMsgsHibernateUtil() call twice and it impact performance since we look up the bean again applicationcontext.  Recommend to assign variable if sonar doesn't mark violation.","created_at":"2016-06-10T15:11:30Z","updated_at":"2016-06-10T15:11:30Z","html_url":"https://github.com/CONNECT-Solution/CONNECT/pull/1296#discussion_r66630145","pull_request_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/1296","_links":{"self":{"href":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/comments/66630145"},"html":{"href":"https://github.com/CONNECT-Solution/CONNECT/pull/1296#discussion_r66630145"},"pull_request":{"href":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/1296"}}},"pull_request":{"url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/1296","id":73032143,"html_url":"https://github.com/CONNECT-Solution/CONNECT/pull/1296","diff_url":"https://github.com/CONNECT-Solution/CONNECT/pull/1296.diff","patch_url":"https://github.com/CONNECT-Solution/CONNECT/pull/1296.patch","issue_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/issues/1296","number":1296,"state":"open","locked":false,"title":"FHAC-1023: Fix SonarQube blockers/major issues introduced from Hibernate upgrade.","user":{"login":"danielrf123","id":16464874,"avatar_url":"https://avatars.githubusercontent.com/u/16464874?v=3","gravatar_id":"","url":"https://api.github.com/users/danielrf123","html_url":"https://github.com/danielrf123","followers_url":"https://api.github.com/users/danielrf123/followers","following_url":"https://api.github.com/users/danielrf123/following{/other_user}","gists_url":"https://api.github.com/users/danielrf123/gists{/gist_id}","starred_url":"https://api.github.com/users/danielrf123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielrf123/subscriptions","organizations_url":"https://api.github.com/users/danielrf123/orgs","repos_url":"https://api.github.com/users/danielrf123/repos","events_url":"https://api.github.com/users/danielrf123/events{/privacy}","received_events_url":"https://api.github.com/users/danielrf123/received_events","type":"User","site_admin":false},"body":"1) Removed static blocks from HibernateUtil classes and have buildSessionFactory() and closeSessionFactory() be used to manage session factories.\r\n2) HibernateUtil is no longer used as a singleton.  Have classes that call it own their own HibernateUtil.\r\n\r\n@mhpnguyen , @TabassumJafri  can you please review.","created_at":"2016-06-08T11:47:23Z","updated_at":"2016-06-10T15:11:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d12cca351d8305812788b36df51fbd6f3ac61274","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/1296/commits","review_comments_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/1296/comments","review_comment_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/issues/1296/comments","statuses_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/statuses/39119c6b1b6ab5540538ba620423314a520226d5","head":{"label":"danielrf123:FHAC-1023","ref":"FHAC-1023","sha":"39119c6b1b6ab5540538ba620423314a520226d5","user":{"login":"danielrf123","id":16464874,"avatar_url":"https://avatars.githubusercontent.com/u/16464874?v=3","gravatar_id":"","url":"https://api.github.com/users/danielrf123","html_url":"https://github.com/danielrf123","followers_url":"https://api.github.com/users/danielrf123/followers","following_url":"https://api.github.com/users/danielrf123/following{/other_user}","gists_url":"https://api.github.com/users/danielrf123/gists{/gist_id}","starred_url":"https://api.github.com/users/danielrf123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielrf123/subscriptions","organizations_url":"https://api.github.com/users/danielrf123/orgs","repos_url":"https://api.github.com/users/danielrf123/repos","events_url":"https://api.github.com/users/danielrf123/events{/privacy}","received_events_url":"https://api.github.com/users/danielrf123/received_events","type":"User","site_admin":false},"repo":{"id":48698295,"name":"CONNECT","full_name":"danielrf123/CONNECT","owner":{"login":"danielrf123","id":16464874,"avatar_url":"https://avatars.githubusercontent.com/u/16464874?v=3","gravatar_id":"","url":"https://api.github.com/users/danielrf123","html_url":"https://github.com/danielrf123","followers_url":"https://api.github.com/users/danielrf123/followers","following_url":"https://api.github.com/users/danielrf123/following{/other_user}","gists_url":"https://api.github.com/users/danielrf123/gists{/gist_id}","starred_url":"https://api.github.com/users/danielrf123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielrf123/subscriptions","organizations_url":"https://api.github.com/users/danielrf123/orgs","repos_url":"https://api.github.com/users/danielrf123/repos","events_url":"https://api.github.com/users/danielrf123/events{/privacy}","received_events_url":"https://api.github.com/users/danielrf123/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielrf123/CONNECT","description":"CONNECT Codebase (2.x, 3.x, 4.x)","fork":true,"url":"https://api.github.com/repos/danielrf123/CONNECT","forks_url":"https://api.github.com/repos/danielrf123/CONNECT/forks","keys_url":"https://api.github.com/repos/danielrf123/CONNECT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielrf123/CONNECT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielrf123/CONNECT/teams","hooks_url":"https://api.github.com/repos/danielrf123/CONNECT/hooks","issue_events_url":"https://api.github.com/repos/danielrf123/CONNECT/issues/events{/number}","events_url":"https://api.github.com/repos/danielrf123/CONNECT/events","assignees_url":"https://api.github.com/repos/danielrf123/CONNECT/assignees{/user}","branches_url":"https://api.github.com/repos/danielrf123/CONNECT/branches{/branch}","tags_url":"https://api.github.com/repos/danielrf123/CONNECT/tags","blobs_url":"https://api.github.com/repos/danielrf123/CONNECT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielrf123/CONNECT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielrf123/CONNECT/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielrf123/CONNECT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielrf123/CONNECT/statuses/{sha}","languages_url":"https://api.github.com/repos/danielrf123/CONNECT/languages","stargazers_url":"https://api.github.com/repos/danielrf123/CONNECT/stargazers","contributors_url":"https://api.github.com/repos/danielrf123/CONNECT/contributors","subscribers_url":"https://api.github.com/repos/danielrf123/CONNECT/subscribers","subscription_url":"https://api.github.com/repos/danielrf123/CONNECT/subscription","commits_url":"https://api.github.com/repos/danielrf123/CONNECT/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielrf123/CONNECT/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielrf123/CONNECT/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielrf123/CONNECT/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielrf123/CONNECT/contents/{+path}","compare_url":"https://api.github.com/repos/danielrf123/CONNECT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielrf123/CONNECT/merges","archive_url":"https://api.github.com/repos/danielrf123/CONNECT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielrf123/CONNECT/downloads","issues_url":"https://api.github.com/repos/danielrf123/CONNECT/issues{/number}","pulls_url":"https://api.github.com/repos/danielrf123/CONNECT/pulls{/number}","milestones_url":"https://api.github.com/repos/danielrf123/CONNECT/milestones{/number}","notifications_url":"https://api.github.com/repos/danielrf123/CONNECT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielrf123/CONNECT/labels{/name}","releases_url":"https://api.github.com/repos/danielrf123/CONNECT/releases{/id}","deployments_url":"https://api.github.com/repos/danielrf123/CONNECT/deployments","created_at":"2015-12-28T15:16:37Z","updated_at":"2015-12-28T15:16:52Z","pushed_at":"2016-06-10T03:23:37Z","git_url":"git://github.com/danielrf123/CONNECT.git","ssh_url":"git@github.com:danielrf123/CONNECT.git","clone_url":"https://github.com/danielrf123/CONNECT.git","svn_url":"https://github.com/danielrf123/CONNECT","homepage":"http://www.connectopensource.org","size":1924726,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"CONNECT_integration"}},"base":{"label":"CONNECT-Solution:CONNECT_integration","ref":"CONNECT_integration","sha":"047e62b31681ccbc6b758c06e6fcef10dbab7acc","user":{"login":"CONNECT-Solution","id":1440978,"avatar_url":"https://avatars.githubusercontent.com/u/1440978?v=3","gravatar_id":"","url":"https://api.github.com/users/CONNECT-Solution","html_url":"https://github.com/CONNECT-Solution","followers_url":"https://api.github.com/users/CONNECT-Solution/followers","following_url":"https://api.github.com/users/CONNECT-Solution/following{/other_user}","gists_url":"https://api.github.com/users/CONNECT-Solution/gists{/gist_id}","starred_url":"https://api.github.com/users/CONNECT-Solution/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CONNECT-Solution/subscriptions","organizations_url":"https://api.github.com/users/CONNECT-Solution/orgs","repos_url":"https://api.github.com/users/CONNECT-Solution/repos","events_url":"https://api.github.com/users/CONNECT-Solution/events{/privacy}","received_events_url":"https://api.github.com/users/CONNECT-Solution/received_events","type":"Organization","site_admin":false},"repo":{"id":3452904,"name":"CONNECT","full_name":"CONNECT-Solution/CONNECT","owner":{"login":"CONNECT-Solution","id":1440978,"avatar_url":"https://avatars.githubusercontent.com/u/1440978?v=3","gravatar_id":"","url":"https://api.github.com/users/CONNECT-Solution","html_url":"https://github.com/CONNECT-Solution","followers_url":"https://api.github.com/users/CONNECT-Solution/followers","following_url":"https://api.github.com/users/CONNECT-Solution/following{/other_user}","gists_url":"https://api.github.com/users/CONNECT-Solution/gists{/gist_id}","starred_url":"https://api.github.com/users/CONNECT-Solution/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CONNECT-Solution/subscriptions","organizations_url":"https://api.github.com/users/CONNECT-Solution/orgs","repos_url":"https://api.github.com/users/CONNECT-Solution/repos","events_url":"https://api.github.com/users/CONNECT-Solution/events{/privacy}","received_events_url":"https://api.github.com/users/CONNECT-Solution/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CONNECT-Solution/CONNECT","description":"CONNECT Codebase (2.x, 3.x, 4.x)","fork":false,"url":"https://api.github.com/repos/CONNECT-Solution/CONNECT","forks_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/forks","keys_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/teams","hooks_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/hooks","issue_events_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/issues/events{/number}","events_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/events","assignees_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/assignees{/user}","branches_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/branches{/branch}","tags_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/tags","blobs_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/git/refs{/sha}","trees_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/statuses/{sha}","languages_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/languages","stargazers_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/stargazers","contributors_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/contributors","subscribers_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/subscribers","subscription_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/subscription","commits_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/commits{/sha}","git_commits_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/git/commits{/sha}","comments_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/comments{/number}","issue_comment_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/issues/comments{/number}","contents_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/contents/{+path}","compare_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/merges","archive_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/downloads","issues_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/issues{/number}","pulls_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls{/number}","milestones_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/milestones{/number}","notifications_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/labels{/name}","releases_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/releases{/id}","deployments_url":"https://api.github.com/repos/CONNECT-Solution/CONNECT/deployments","created_at":"2012-02-15T19:44:26Z","updated_at":"2016-05-20T02:13:10Z","pushed_at":"2016-06-10T03:23:38Z","git_url":"git://github.com/CONNECT-Solution/CONNECT.git","ssh_url":"git@github.com:CONNECT-Solution/CONNECT.git","clone_url":"https://github.com/CONNECT-Solution/CONNECT.git","svn_url":"https://github.com/CONNECT-Solution/CONNECT","homepage":"http://www.connectopensource.org","size":1938445,"stargazers_count":46,"watchers_count":46,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":84,"mirror_url":null,"open_issues_count":2,"forks":84,"open_issues":2,"watchers":46,"default_branch":"CONNECT_integration"}},"_links":{"self":{"href":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/1296"},"html":{"href":"https://github.com/CONNECT-Solution/CONNECT/pull/1296"},"issue":{"href":"https://api.github.com/repos/CONNECT-Solution/CONNECT/issues/1296"},"comments":{"href":"https://api.github.com/repos/CONNECT-Solution/CONNECT/issues/1296/comments"},"review_comments":{"href":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/1296/comments"},"review_comment":{"href":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CONNECT-Solution/CONNECT/pulls/1296/commits"},"statuses":{"href":"https://api.github.com/repos/CONNECT-Solution/CONNECT/statuses/39119c6b1b6ab5540538ba620423314a520226d5"}}}}
{"actor":{"display_login":"mhpnguyen"}}