title: jvm hanging while connecting to database
body: <p>hi in websphere application jvm is hanging twice in two months crashing the entire application,so need to know whether it is because of slow database connection or driver issue.The log snippet is</p>
  
  <pre><code>    There is/are 1 thread(s) in total in the server that may be hung.
     at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:155)
      at oracle.net.ns.Packet.receive(Packet.java:283)
      at oracle.net.ns.DataPacket.receive(DataPacket.java:103)
      at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:230)
      at oracle.net.ns.NetInputStream.read(NetInputStream.java:175)
      at oracle.net.ns.NetInputStream.read(NetInputStream.java:100)
      at oracle.net.ns.NetInputStream.read(NetInputStream.java:85)
      at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:123)
      at oracle.jdbc.driver.T4CSocketInputStreamW.rapper.read(T4CSocketInputStreamWrapper.java:79)
      at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1122)
      at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1099)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:288)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
      at oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:1084)
      at  oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:359)
      at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:263)
      at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:169)
      at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:619)
      at com.common.database.ResultSetHandler.invoke(ResultSetHandler.java:44)
      ** at $Proxy1.next(Unknown Source)**
      at com.common.database.CachedRowSetImpl.populate(CachedRowSetImpl.java:597)
      at com.common.database.PreparedStatementHandler.invoke(PreparedStatementHandler.java:47)
      **at $Proxy0.executeQuery(Unknown Source)**
  </code></pre>