title: java BlockingQueue and JDBC batch update
body: <p>I am looking for java concurrency solution, so that i can use JDBC Batch updates. 
  BlockingQueue will let me one item at time, i have already have method on DAO to batch update, but I need some solution so that i can take advantage of JDBC Batch update instead of single record updates.</p>
  
  <p>My worker thread looks following:</p>
  
  <pre><code>class DBWorker extends Thread {
      @Override
      public void run() {
          try {
              while (true) {
                  try {
                      Pair&lt;Long, Status&gt; p = dbQ.take();
                      //--
                      orderDao.updateStatus(p.getLeft(), p.getRight());
                  } catch (InterruptedException e) {
                      log.error(e);
                  }
              }
          } catch (Exception e) {
              log.error(e);
          } finally {
  
          }
      }
  }
  </code></pre>