{"action":"created","issue":{"url":"https://api.github.com/repos/rsim/oracle-enhanced/issues/147","labels_url":"https://api.github.com/repos/rsim/oracle-enhanced/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/rsim/oracle-enhanced/issues/147/comments","events_url":"https://api.github.com/repos/rsim/oracle-enhanced/issues/147/events","html_url":"https://github.com/rsim/oracle-enhanced/issues/147","id":3167183,"number":147,"title":"JNDI connections don't work with websphere wrapped connections","user":{"login":"moger777","id":48684,"avatar_url":"https://avatars.githubusercontent.com/u/48684?v=3","gravatar_id":"","url":"https://api.github.com/users/moger777","html_url":"https://github.com/moger777","followers_url":"https://api.github.com/users/moger777/followers","following_url":"https://api.github.com/users/moger777/following{/other_user}","gists_url":"https://api.github.com/users/moger777/gists{/gist_id}","starred_url":"https://api.github.com/users/moger777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moger777/subscriptions","organizations_url":"https://api.github.com/users/moger777/orgs","repos_url":"https://api.github.com/users/moger777/repos","events_url":"https://api.github.com/users/moger777/events{/privacy}","received_events_url":"https://api.github.com/users/moger777/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2012-02-10T02:52:44Z","updated_at":"2016-01-25T19:56:58Z","closed_at":"2016-01-25T19:56:58Z","body":"To use JNDI connections with oracle enhanced, on unwrapped jdbc connection is needed do to calls to getNUMBER, getRAW. When using Websphere, it seems that it's not possible to configure to use unwrapped jdbc connection (if I am wrong here, feel free to chime in). I was thinking of modifying the code so that:\r\n\r\nline 492 of oracle_enhanced_jdbc_connection.rb\r\n\r\n```ruby\r\nwhen :NUMBER\r\n  d = rset.getNUMBER(i)\r\n  if d.nil?\r\n    nil\r\n  elsif d.isInt\r\n    Integer(d.stringValue)\r\n  else\r\n    BigDecimal.new(d.stringValue)\r\n  end\r\n```\r\n\r\nbecomes:\r\n\r\n```ruby\r\nwhen :NUMBER\r\n  d = rset.getString(i)\r\n  if rset.wasNull\r\n    d\r\n  elsif rset.getMetaData.getScale(i) == 0\r\n    Integer(d)\r\n  else\r\n    BigDecimal.new(d)\r\n  end\r\n```\r\n\r\nI was wondering if there are any unforeseen consequences I should be aware of before I get too far coding this (I'll probably do something similar to getRAW). "},"comment":{"url":"https://api.github.com/repos/rsim/oracle-enhanced/issues/comments/174640083","html_url":"https://github.com/rsim/oracle-enhanced/issues/147#issuecomment-174640083","issue_url":"https://api.github.com/repos/rsim/oracle-enhanced/issues/147","id":174640083,"user":{"login":"yahonda","id":73684,"avatar_url":"https://avatars.githubusercontent.com/u/73684?v=3","gravatar_id":"","url":"https://api.github.com/users/yahonda","html_url":"https://github.com/yahonda","followers_url":"https://api.github.com/users/yahonda/followers","following_url":"https://api.github.com/users/yahonda/following{/other_user}","gists_url":"https://api.github.com/users/yahonda/gists{/gist_id}","starred_url":"https://api.github.com/users/yahonda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahonda/subscriptions","organizations_url":"https://api.github.com/users/yahonda/orgs","repos_url":"https://api.github.com/users/yahonda/repos","events_url":"https://api.github.com/users/yahonda/events{/privacy}","received_events_url":"https://api.github.com/users/yahonda/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T19:56:58Z","updated_at":"2016-01-25T19:56:58Z","body":"Closing this since no updates found recently."}}