{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments/82938357","pull_request_review_id":3809894,"id":82938357,"diff_hunk":"@@ -48,70 +49,23 @@ protected void activate(ComponentContext context) {\n             log.debug(\"Social Activity service is activated  with SQL Implementation\");\n         }\n \n-        JDBCPersistenceManager jdbcPersistenceManager;\n         try {\n-            jdbcPersistenceManager = JDBCPersistenceManager.getInstance();\n-            jdbcPersistenceManager.initializeDatabase();\n-        } catch (Exception e) {\n-            log.error(\"Failed to initilize database. \" + e);\n-        }\n-        testAddinLC();\n-        testGettingLCList();\n-        testGetLCContent();\n-    }\n-\n-    protected void setDataSourceService(DataSourceService dataSourceService) {\n-        if (log.isDebugEnabled()) {\n-            log.debug(\"Setting the DataSourceService\");\n-        }\n-        JDBCPersistenceManager.setCarbonDataSourceService(dataSourceService);\n-    }\n+            LCMgtDBUtil.initialize();\n+            LCUtils.initiateLCMap();\n \n-    protected void unsetDataSourceService(DataSourceService dataSourceService) {\n-        if (log.isDebugEnabled()) {\n-            log.debug(\"Unsetting the DataSourceService\");\n-        }\n-        JDBCPersistenceManager.setCarbonDataSourceService(null);\n-    }\n-\n-    private void testAddinLC(){\n-        LCManagementService lcManagementService = new LCManagementServiceImpl();\n-        String content =\n-                \"<aspect name=\\\"ServerLifecycle\\\" class=\\\"org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle\\\">\\n\"\n-                + \"    <configuration type=\\\"literal\\\">\\n\" + \"        <lifecycle>\\n\"\n-                + \"            <scxml xmlns=\\\"http://www.w3.org/2005/07/scxml\\\"\\n\"\n-                + \"                   version=\\\"1.0\\\"\\n\" + \"                   initialstate=\\\"Active\\\">\\n\"\n-                + \"                <state id=\\\"Active\\\">\\n\"\n-                + \"                    <transition event=\\\"Deactivate\\\" target=\\\"Off\\\"/>\\n\"\n-                + \"                </state>\\n\" + \"                <state id=\\\"Off\\\">\\n\"\n-                + \"                    <transition event=\\\"Activate\\\" target=\\\"Active\\\"/>\\n\"\n-                + \"                </state>\\n\" + \"            </scxml>\\n\" + \"        </lifecycle>\\n\"\n-                + \"    </configuration>\\n\" + \"</aspect>\";\n-        try {\n-            lcManagementService.createLifecycle(content);\n+        } catch (LCManagerDatabaseException e) {\n+            log.error(\"Failed to initialize database. \" + e);","path":"components/lcm/org.wso2.carbon.apimgt.lifecycle.manager.core/src/main/java/org/wso2/carbon/apimgt/lifecycle/manager/core/internal/LCServiceComponent.java","position":77,"original_position":77,"commit_id":"815fcd9039863435469edd8a33a7f90a78832941","original_commit_id":"815fcd9039863435469edd8a33a7f90a78832941","user":{"login":"sajinidesilva","id":1833441,"avatar_url":"https://avatars.githubusercontent.com/u/1833441?v=3","gravatar_id":"","url":"https://api.github.com/users/sajinidesilva","html_url":"https://github.com/sajinidesilva","followers_url":"https://api.github.com/users/sajinidesilva/followers","following_url":"https://api.github.com/users/sajinidesilva/following{/other_user}","gists_url":"https://api.github.com/users/sajinidesilva/gists{/gist_id}","starred_url":"https://api.github.com/users/sajinidesilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sajinidesilva/subscriptions","organizations_url":"https://api.github.com/users/sajinidesilva/orgs","repos_url":"https://api.github.com/users/sajinidesilva/repos","events_url":"https://api.github.com/users/sajinidesilva/events{/privacy}","received_events_url":"https://api.github.com/users/sajinidesilva/received_events","type":"User","site_admin":false},"body":"shall we pass the exception like this? \r\n\r\nlog.error(\"Failed to initialize database. \" + e.getMessage() , e);","created_at":"2016-10-12T05:26:23Z","updated_at":"2016-10-12T05:26:23Z","html_url":"https://github.com/wso2/carbon-apimgt/pull/2974#discussion_r82938357","pull_request_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/2974","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments/82938357"},"html":{"href":"https://github.com/wso2/carbon-apimgt/pull/2974#discussion_r82938357"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/2974"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/2974","id":88815876,"html_url":"https://github.com/wso2/carbon-apimgt/pull/2974","diff_url":"https://github.com/wso2/carbon-apimgt/pull/2974.diff","patch_url":"https://github.com/wso2/carbon-apimgt/pull/2974.patch","issue_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/2974","number":2974,"state":"closed","locked":false,"title":"Lifecycle manager basic operations","user":{"login":"Rajith90","id":12757270,"avatar_url":"https://avatars.githubusercontent.com/u/12757270?v=3","gravatar_id":"","url":"https://api.github.com/users/Rajith90","html_url":"https://github.com/Rajith90","followers_url":"https://api.github.com/users/Rajith90/followers","following_url":"https://api.github.com/users/Rajith90/following{/other_user}","gists_url":"https://api.github.com/users/Rajith90/gists{/gist_id}","starred_url":"https://api.github.com/users/Rajith90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rajith90/subscriptions","organizations_url":"https://api.github.com/users/Rajith90/orgs","repos_url":"https://api.github.com/users/Rajith90/repos","events_url":"https://api.github.com/users/Rajith90/events{/privacy}","received_events_url":"https://api.github.com/users/Rajith90/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-11T11:33:45Z","updated_at":"2016-10-12T05:26:23Z","closed_at":"2016-10-11T11:35:11Z","merged_at":"2016-10-11T11:35:11Z","merge_commit_sha":"5d98ed7800c96324e548c5fcfcbc4f0f3b222fce","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/2974/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/2974/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/2974/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/815fcd9039863435469edd8a33a7f90a78832941","head":{"label":"Rajith90:api-product-local","ref":"api-product-local","sha":"815fcd9039863435469edd8a33a7f90a78832941","user":{"login":"Rajith90","id":12757270,"avatar_url":"https://avatars.githubusercontent.com/u/12757270?v=3","gravatar_id":"","url":"https://api.github.com/users/Rajith90","html_url":"https://github.com/Rajith90","followers_url":"https://api.github.com/users/Rajith90/followers","following_url":"https://api.github.com/users/Rajith90/following{/other_user}","gists_url":"https://api.github.com/users/Rajith90/gists{/gist_id}","starred_url":"https://api.github.com/users/Rajith90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rajith90/subscriptions","organizations_url":"https://api.github.com/users/Rajith90/orgs","repos_url":"https://api.github.com/users/Rajith90/repos","events_url":"https://api.github.com/users/Rajith90/events{/privacy}","received_events_url":"https://api.github.com/users/Rajith90/received_events","type":"User","site_admin":false},"repo":{"id":57181080,"name":"carbon-apimgt","full_name":"Rajith90/carbon-apimgt","owner":{"login":"Rajith90","id":12757270,"avatar_url":"https://avatars.githubusercontent.com/u/12757270?v=3","gravatar_id":"","url":"https://api.github.com/users/Rajith90","html_url":"https://github.com/Rajith90","followers_url":"https://api.github.com/users/Rajith90/followers","following_url":"https://api.github.com/users/Rajith90/following{/other_user}","gists_url":"https://api.github.com/users/Rajith90/gists{/gist_id}","starred_url":"https://api.github.com/users/Rajith90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rajith90/subscriptions","organizations_url":"https://api.github.com/users/Rajith90/orgs","repos_url":"https://api.github.com/users/Rajith90/repos","events_url":"https://api.github.com/users/Rajith90/events{/privacy}","received_events_url":"https://api.github.com/users/Rajith90/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rajith90/carbon-apimgt","description":"","fork":true,"url":"https://api.github.com/repos/Rajith90/carbon-apimgt","forks_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/forks","keys_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/teams","hooks_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/hooks","issue_events_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/issues/events{/number}","events_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/events","assignees_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/assignees{/user}","branches_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/branches{/branch}","tags_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/tags","blobs_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/statuses/{sha}","languages_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/languages","stargazers_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/stargazers","contributors_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/contributors","subscribers_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/subscribers","subscription_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/subscription","commits_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/contents/{+path}","compare_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/merges","archive_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/downloads","issues_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/issues{/number}","pulls_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/pulls{/number}","milestones_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/milestones{/number}","notifications_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/labels{/name}","releases_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/releases{/id}","deployments_url":"https://api.github.com/repos/Rajith90/carbon-apimgt/deployments","created_at":"2016-04-27T03:38:08Z","updated_at":"2016-04-27T03:38:25Z","pushed_at":"2016-10-11T11:30:40Z","git_url":"git://github.com/Rajith90/carbon-apimgt.git","ssh_url":"git@github.com:Rajith90/carbon-apimgt.git","clone_url":"https://github.com/Rajith90/carbon-apimgt.git","svn_url":"https://github.com/Rajith90/carbon-apimgt","homepage":null,"size":140248,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"master"}},"base":{"label":"wso2:api-product","ref":"api-product","sha":"aec33f61a89e78f1b99431b779748b44773998fa","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":17201744,"name":"carbon-apimgt","full_name":"wso2/carbon-apimgt","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/carbon-apimgt","description":"","fork":false,"url":"https://api.github.com/repos/wso2/carbon-apimgt","forks_url":"https://api.github.com/repos/wso2/carbon-apimgt/forks","keys_url":"https://api.github.com/repos/wso2/carbon-apimgt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-apimgt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-apimgt/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-apimgt/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-apimgt/events","assignees_url":"https://api.github.com/repos/wso2/carbon-apimgt/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-apimgt/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-apimgt/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-apimgt/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-apimgt/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-apimgt/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-apimgt/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-apimgt/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-apimgt/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-apimgt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-apimgt/merges","archive_url":"https://api.github.com/repos/wso2/carbon-apimgt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-apimgt/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-apimgt/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-apimgt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-apimgt/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-apimgt/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/carbon-apimgt/deployments","created_at":"2014-02-26T06:46:48Z","updated_at":"2016-10-08T14:32:13Z","pushed_at":"2016-10-11T11:35:11Z","git_url":"git://github.com/wso2/carbon-apimgt.git","ssh_url":"git@github.com:wso2/carbon-apimgt.git","clone_url":"https://github.com/wso2/carbon-apimgt.git","svn_url":"https://github.com/wso2/carbon-apimgt","homepage":null,"size":183247,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":193,"mirror_url":null,"open_issues_count":8,"forks":193,"open_issues":8,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/2974"},"html":{"href":"https://github.com/wso2/carbon-apimgt/pull/2974"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/issues/2974"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/issues/2974/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/2974/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/2974/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/815fcd9039863435469edd8a33a7f90a78832941"}}}}
{"actor":{"display_login":"sajinidesilva"}}