title: JDBC4Connection and JDBC4PreparedStatement locked
body: <p>I've a thread dump that has a lot of threads that show locked JDBC4Connection and JDBC4PreparedStatement.Why too many threads are showing locked connection and prepared statement ...</p>
  
  <pre><code>"ajp-bio-14009-exec-606" daemon prio=10 tid=0x00007f625405f800 nid=0x2f88 runnable [0x00007f61cfaf7000]
     java.lang.Thread.State: RUNNABLE
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:129)
      at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:114)
      at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:161)
      at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:189)
      - locked &lt;0x00000006f1111988&gt; (a com.mysql.jdbc.util.ReadAheadInputStream)
      at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2537)
      at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2990)
      at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2979)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3520)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
      - locked &lt;0x00000006f11113e8&gt; (a com.mysql.jdbc.JDBC4Connection)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
      - locked &lt;0x00000006d593e3e8&gt; (a com.mysql.jdbc.JDBC4PreparedStatement)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)
      - locked &lt;0x00000006f11113e8&gt; (a com.mysql.jdbc.JDBC4Connection)
      - locked &lt;0x00000006d593e3e8&gt; (a com.mysql.jdbc.JDBC4PreparedStatement)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)
      - locked &lt;0x00000006d593e3e8&gt; (a com.mysql.jdbc.JDBC4PreparedStatement)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)
      at com.appnetix.app.util.QueryUtil.update(QueryUtil.java:534)
  </code></pre>