{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/esb-connectors/pulls/comments/48116987","id":48116987,"diff_hunk":"@@ -0,0 +1,59 @@\n+package org.wso2.carbon.connector.ISO8583;\n+\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+import java.io.DataOutputStream;\n+import java.io.IOException;\n+import java.net.Socket;\n+\n+public class ISO8583SocketPool implements Runnable {\n+    private static final Log log = LogFactory.getLog(ISO8583SocketPool.class);\n+    private String msg;\n+    private  DataOutputStream outStream;\n+    static Socket socket;\n+    private static String host;\n+    private static int port;\n+    private static final ThreadLocal<Socket> threadLocal =\n+            new ThreadLocal<Socket>(){\n+                @Override\n+                protected Socket initialValue(){\n+                    try {\n+                        socket =  new Socket(host,port);\n+                    } catch (IOException e) {\n+                       log.error(\"Couldn't create socket\");\n+                    }\n+                    return socket;              }\n+            };\n+\n+    public ISO8583SocketPool(String host,int port ,String details){\n+        this.msg = details;\n+        this.host = host;\n+        this.port = port;\n+    }\n+\n+    public static Socket getSocket(){\n+        return threadLocal.get();\n+    }\n+\n+    public void run(){\n+        Socket connection = getSocket();\n+        try {\n+            outStream = new DataOutputStream(connection.getOutputStream());\n+            if (connection.isConnected()) {\n+                outStream .writeBytes(msg);\n+                outStream.flush();\n+            }\n+            if(!connection.isConnected()){\n+                log.info(\"Server is not connected\");\n+            }\n+        } catch (Exception e) {","path":"ISO8583/ISO8583-connector/ISO8583-connector-1.0.0/org.wso2.carbon.connector/src/main/java/org/wso2/carbon/connector/ISO8583/ISO8583SocketPool.java","position":49,"original_position":49,"commit_id":"dd13182874393868156fa215e57d5e223607bdc5","original_commit_id":"dd13182874393868156fa215e57d5e223607bdc5","user":{"login":"Shakila","id":2033965,"avatar_url":"https://avatars.githubusercontent.com/u/2033965?v=3","gravatar_id":"","url":"https://api.github.com/users/Shakila","html_url":"https://github.com/Shakila","followers_url":"https://api.github.com/users/Shakila/followers","following_url":"https://api.github.com/users/Shakila/following{/other_user}","gists_url":"https://api.github.com/users/Shakila/gists{/gist_id}","starred_url":"https://api.github.com/users/Shakila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shakila/subscriptions","organizations_url":"https://api.github.com/users/Shakila/orgs","repos_url":"https://api.github.com/users/Shakila/repos","events_url":"https://api.github.com/users/Shakila/events{/privacy}","received_events_url":"https://api.github.com/users/Shakila/received_events","type":"User","site_admin":false},"body":"Catch specific exception. Consider this in whole PR.","created_at":"2015-12-21T04:53:01Z","updated_at":"2015-12-21T04:53:01Z","html_url":"https://github.com/wso2/esb-connectors/pull/474#discussion_r48116987","pull_request_url":"https://api.github.com/repos/wso2/esb-connectors/pulls/474","_links":{"self":{"href":"https://api.github.com/repos/wso2/esb-connectors/pulls/comments/48116987"},"html":{"href":"https://github.com/wso2/esb-connectors/pull/474#discussion_r48116987"},"pull_request":{"href":"https://api.github.com/repos/wso2/esb-connectors/pulls/474"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/esb-connectors/pulls/474","id":54177947,"html_url":"https://github.com/wso2/esb-connectors/pull/474","diff_url":"https://github.com/wso2/esb-connectors/pull/474.diff","patch_url":"https://github.com/wso2/esb-connectors/pull/474.patch","issue_url":"https://api.github.com/repos/wso2/esb-connectors/issues/474","number":474,"state":"open","locked":false,"title":"ISO8583 Added","user":{"login":"Kanapriya","id":13362482,"avatar_url":"https://avatars.githubusercontent.com/u/13362482?v=3","gravatar_id":"","url":"https://api.github.com/users/Kanapriya","html_url":"https://github.com/Kanapriya","followers_url":"https://api.github.com/users/Kanapriya/followers","following_url":"https://api.github.com/users/Kanapriya/following{/other_user}","gists_url":"https://api.github.com/users/Kanapriya/gists{/gist_id}","starred_url":"https://api.github.com/users/Kanapriya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kanapriya/subscriptions","organizations_url":"https://api.github.com/users/Kanapriya/orgs","repos_url":"https://api.github.com/users/Kanapriya/repos","events_url":"https://api.github.com/users/Kanapriya/events{/privacy}","received_events_url":"https://api.github.com/users/Kanapriya/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-19T12:36:26Z","updated_at":"2015-12-21T04:53:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ebecfca50a0365a3904b2c3cf0259e03648be8f7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/esb-connectors/pulls/474/commits","review_comments_url":"https://api.github.com/repos/wso2/esb-connectors/pulls/474/comments","review_comment_url":"https://api.github.com/repos/wso2/esb-connectors/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/esb-connectors/issues/474/comments","statuses_url":"https://api.github.com/repos/wso2/esb-connectors/statuses/dd13182874393868156fa215e57d5e223607bdc5","head":{"label":"Kanapriya:master","ref":"master","sha":"dd13182874393868156fa215e57d5e223607bdc5","user":{"login":"Kanapriya","id":13362482,"avatar_url":"https://avatars.githubusercontent.com/u/13362482?v=3","gravatar_id":"","url":"https://api.github.com/users/Kanapriya","html_url":"https://github.com/Kanapriya","followers_url":"https://api.github.com/users/Kanapriya/followers","following_url":"https://api.github.com/users/Kanapriya/following{/other_user}","gists_url":"https://api.github.com/users/Kanapriya/gists{/gist_id}","starred_url":"https://api.github.com/users/Kanapriya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kanapriya/subscriptions","organizations_url":"https://api.github.com/users/Kanapriya/orgs","repos_url":"https://api.github.com/users/Kanapriya/repos","events_url":"https://api.github.com/users/Kanapriya/events{/privacy}","received_events_url":"https://api.github.com/users/Kanapriya/received_events","type":"User","site_admin":false},"repo":{"id":48281000,"name":"esb-connectors","full_name":"Kanapriya/esb-connectors","owner":{"login":"Kanapriya","id":13362482,"avatar_url":"https://avatars.githubusercontent.com/u/13362482?v=3","gravatar_id":"","url":"https://api.github.com/users/Kanapriya","html_url":"https://github.com/Kanapriya","followers_url":"https://api.github.com/users/Kanapriya/followers","following_url":"https://api.github.com/users/Kanapriya/following{/other_user}","gists_url":"https://api.github.com/users/Kanapriya/gists{/gist_id}","starred_url":"https://api.github.com/users/Kanapriya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kanapriya/subscriptions","organizations_url":"https://api.github.com/users/Kanapriya/orgs","repos_url":"https://api.github.com/users/Kanapriya/repos","events_url":"https://api.github.com/users/Kanapriya/events{/privacy}","received_events_url":"https://api.github.com/users/Kanapriya/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kanapriya/esb-connectors","description":"","fork":true,"url":"https://api.github.com/repos/Kanapriya/esb-connectors","forks_url":"https://api.github.com/repos/Kanapriya/esb-connectors/forks","keys_url":"https://api.github.com/repos/Kanapriya/esb-connectors/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kanapriya/esb-connectors/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kanapriya/esb-connectors/teams","hooks_url":"https://api.github.com/repos/Kanapriya/esb-connectors/hooks","issue_events_url":"https://api.github.com/repos/Kanapriya/esb-connectors/issues/events{/number}","events_url":"https://api.github.com/repos/Kanapriya/esb-connectors/events","assignees_url":"https://api.github.com/repos/Kanapriya/esb-connectors/assignees{/user}","branches_url":"https://api.github.com/repos/Kanapriya/esb-connectors/branches{/branch}","tags_url":"https://api.github.com/repos/Kanapriya/esb-connectors/tags","blobs_url":"https://api.github.com/repos/Kanapriya/esb-connectors/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kanapriya/esb-connectors/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kanapriya/esb-connectors/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kanapriya/esb-connectors/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kanapriya/esb-connectors/statuses/{sha}","languages_url":"https://api.github.com/repos/Kanapriya/esb-connectors/languages","stargazers_url":"https://api.github.com/repos/Kanapriya/esb-connectors/stargazers","contributors_url":"https://api.github.com/repos/Kanapriya/esb-connectors/contributors","subscribers_url":"https://api.github.com/repos/Kanapriya/esb-connectors/subscribers","subscription_url":"https://api.github.com/repos/Kanapriya/esb-connectors/subscription","commits_url":"https://api.github.com/repos/Kanapriya/esb-connectors/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kanapriya/esb-connectors/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kanapriya/esb-connectors/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kanapriya/esb-connectors/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kanapriya/esb-connectors/contents/{+path}","compare_url":"https://api.github.com/repos/Kanapriya/esb-connectors/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kanapriya/esb-connectors/merges","archive_url":"https://api.github.com/repos/Kanapriya/esb-connectors/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kanapriya/esb-connectors/downloads","issues_url":"https://api.github.com/repos/Kanapriya/esb-connectors/issues{/number}","pulls_url":"https://api.github.com/repos/Kanapriya/esb-connectors/pulls{/number}","milestones_url":"https://api.github.com/repos/Kanapriya/esb-connectors/milestones{/number}","notifications_url":"https://api.github.com/repos/Kanapriya/esb-connectors/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kanapriya/esb-connectors/labels{/name}","releases_url":"https://api.github.com/repos/Kanapriya/esb-connectors/releases{/id}","created_at":"2015-12-19T12:19:35Z","updated_at":"2015-12-19T12:20:35Z","pushed_at":"2015-12-19T17:22:55Z","git_url":"git://github.com/Kanapriya/esb-connectors.git","ssh_url":"git@github.com:Kanapriya/esb-connectors.git","clone_url":"https://github.com/Kanapriya/esb-connectors.git","svn_url":"https://github.com/Kanapriya/esb-connectors","homepage":null,"size":182602,"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":"master"}},"base":{"label":"wso2:master","ref":"master","sha":"a88ce05ef35f36512edcea51fd94d2a9213646dd","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":14882706,"name":"esb-connectors","full_name":"wso2/esb-connectors","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/esb-connectors","description":"","fork":false,"url":"https://api.github.com/repos/wso2/esb-connectors","forks_url":"https://api.github.com/repos/wso2/esb-connectors/forks","keys_url":"https://api.github.com/repos/wso2/esb-connectors/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/esb-connectors/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/esb-connectors/teams","hooks_url":"https://api.github.com/repos/wso2/esb-connectors/hooks","issue_events_url":"https://api.github.com/repos/wso2/esb-connectors/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/esb-connectors/events","assignees_url":"https://api.github.com/repos/wso2/esb-connectors/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/esb-connectors/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/esb-connectors/tags","blobs_url":"https://api.github.com/repos/wso2/esb-connectors/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/esb-connectors/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/esb-connectors/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/esb-connectors/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/esb-connectors/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/esb-connectors/languages","stargazers_url":"https://api.github.com/repos/wso2/esb-connectors/stargazers","contributors_url":"https://api.github.com/repos/wso2/esb-connectors/contributors","subscribers_url":"https://api.github.com/repos/wso2/esb-connectors/subscribers","subscription_url":"https://api.github.com/repos/wso2/esb-connectors/subscription","commits_url":"https://api.github.com/repos/wso2/esb-connectors/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/esb-connectors/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/esb-connectors/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/esb-connectors/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/esb-connectors/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/esb-connectors/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/esb-connectors/merges","archive_url":"https://api.github.com/repos/wso2/esb-connectors/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/esb-connectors/downloads","issues_url":"https://api.github.com/repos/wso2/esb-connectors/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/esb-connectors/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/esb-connectors/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/esb-connectors/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/esb-connectors/labels{/name}","releases_url":"https://api.github.com/repos/wso2/esb-connectors/releases{/id}","created_at":"2013-12-03T03:43:53Z","updated_at":"2015-12-14T09:15:50Z","pushed_at":"2015-12-21T04:50:53Z","git_url":"git://github.com/wso2/esb-connectors.git","ssh_url":"git@github.com:wso2/esb-connectors.git","clone_url":"https://github.com/wso2/esb-connectors.git","svn_url":"https://github.com/wso2/esb-connectors","homepage":null,"size":301234,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":183,"mirror_url":null,"open_issues_count":49,"forks":183,"open_issues":49,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/esb-connectors/pulls/474"},"html":{"href":"https://github.com/wso2/esb-connectors/pull/474"},"issue":{"href":"https://api.github.com/repos/wso2/esb-connectors/issues/474"},"comments":{"href":"https://api.github.com/repos/wso2/esb-connectors/issues/474/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/esb-connectors/pulls/474/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/esb-connectors/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/esb-connectors/pulls/474/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/esb-connectors/statuses/dd13182874393868156fa215e57d5e223607bdc5"}}}}