title: Spring JdbcTemplate batchUpdate handling exceptions
body: <p>Currently our code uses batchUpdate method of JdbcTemplate to do batch Insertion.</p>
  
  <p>My question is in case of any exception in one of the update how to handle it (suppose just by adding the log) and continue with the next update sql statements?</p>
  
  <p>Also how batchUpdate() method fo JdbcTemplate handles the exceptions?</p>
  
  <p>Snippet here.</p>
  
  <pre><code>    /**
       * Saves the list of &lt;code&gt;Item&lt;/code&gt; objects to the database in a batch mode
       * 
       * @param objects
       *    list of objects to save in a batch mode
       */
      public void save(final List&lt;Item&gt; listOfItems) {
  
          for (List&lt;Debit&gt; list : listOfItems) {
              getJdbcTemplate().batchUpdate(insertItem, new ItemBatchPreparedStatementSetter(list));
          }
      }
  </code></pre>