{"action":"created","issue":{"url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/490","labels_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/490/labels{/name}","comments_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/490/comments","events_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/490/events","html_url":"https://github.com/brettwooldridge/HikariCP/issues/490","id":115937048,"number":490,"title":"Please enlighten me about connection close and sizes","user":{"login":"cinlung","id":15739315,"avatar_url":"https://avatars.githubusercontent.com/u/15739315?v=3","gravatar_id":"","url":"https://api.github.com/users/cinlung","html_url":"https://github.com/cinlung","followers_url":"https://api.github.com/users/cinlung/followers","following_url":"https://api.github.com/users/cinlung/following{/other_user}","gists_url":"https://api.github.com/users/cinlung/gists{/gist_id}","starred_url":"https://api.github.com/users/cinlung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cinlung/subscriptions","organizations_url":"https://api.github.com/users/cinlung/orgs","repos_url":"https://api.github.com/users/cinlung/repos","events_url":"https://api.github.com/users/cinlung/events{/privacy}","received_events_url":"https://api.github.com/users/cinlung/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brettwooldridge/HikariCP/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-09T18:33:07Z","updated_at":"2015-11-11T04:39:42Z","closed_at":"2015-11-11T00:21:14Z","body":"Dear Brett\r\n\r\nI am a newbie in connection pool. I want to ask about Connection close() method. I read from your other posting that calling the close() is actually only disconnect the logical reference to the real Connection inside the pool.\r\n\r\nDo I need to set the conn reference I used to null to make sure it does not have any hidden overhead?\r\n\r\nFor example: \r\nHikariDataSource ds = ...... (codes here);\r\nConnection c = ds.getConnection();\r\nc.close();\r\nc = null; //--> Does this help do anything? or the c.close() is enough?\r\n\r\nAlso, one nice thing I used to use in other DB Pool is that I am able to find out number of leased connections and idle connections in the pool. Is there a way to do this with HikariCP?\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/comments/155660919","html_url":"https://github.com/brettwooldridge/HikariCP/issues/490#issuecomment-155660919","issue_url":"https://api.github.com/repos/brettwooldridge/HikariCP/issues/490","id":155660919,"user":{"login":"cinlung","id":15739315,"avatar_url":"https://avatars.githubusercontent.com/u/15739315?v=3","gravatar_id":"","url":"https://api.github.com/users/cinlung","html_url":"https://github.com/cinlung","followers_url":"https://api.github.com/users/cinlung/followers","following_url":"https://api.github.com/users/cinlung/following{/other_user}","gists_url":"https://api.github.com/users/cinlung/gists{/gist_id}","starred_url":"https://api.github.com/users/cinlung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cinlung/subscriptions","organizations_url":"https://api.github.com/users/cinlung/orgs","repos_url":"https://api.github.com/users/cinlung/repos","events_url":"https://api.github.com/users/cinlung/events{/privacy}","received_events_url":"https://api.github.com/users/cinlung/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T04:39:42Z","updated_at":"2015-11-11T04:39:42Z","body":"Thank you for your Info Brett\nOn Nov 11, 2015 7:21 AM, \"Brett Wooldridge\" <notifications@github.com>\nwrote:\n\n> You don't need to set the connection reference to null. Java will handle\n> the reference garbage collection like any other object. The reference is\n> only a reference to HikariCP's ConnectionProxy object anyway, not the true\n> Connection.\n>\n> If you want to monitor pool statistics, see the JMX page\n> <https://github.com/brettwooldridge/HikariCP/wiki/MBean-(JMX)-Monitoring-and-Management>\n> and/or the Dropwizard Metrics\n> <https://github.com/brettwooldridge/HikariCP/wiki/Dropwizard-Metrics>\n> page.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/brettwooldridge/HikariCP/issues/490#issuecomment-155610773>\n> .\n>\n"}}