title: How to change set lock mode to wait in in spring boot application which use informix and jdbcTemplate?
body: <p>I'm using Spring boot 2 with jdbcTemplate in my application. I used Informix.
  I'm testing concurrency and I want my application to wait for a while when
  a query try to update a row that is locked. This time can be set in informix
  with 'SET LOCK MODE TO WAIT 20'. But I'm looking for a method in spring jdbcTemplate or something in spring.</p>
  
  <p>I tried setting a timeout in the <code>jdbcTemplate.setQueryTimeout(60);</code> , but it did not work.</p>
  
  <p>Any idea is welcome.</p>
  
  <pre><code>jdbcTemplate.setQueryTimeout(60);
  cachedExecutor.execute(() -&gt; jdbcTemplate.update(updatenIndoPeriodeInLfa()) );
  
  cachedExecutor.execute(() -&gt; jdbcTemplate.update(updatenAfroPeriodeInLfa()) );
  
  private String updatenIndoPeriodeInLfa(){
          String query = "UPDATE  lfa " +
                  "set indomonth = 09, indoyear = 2019 , indotype = indo " +
                  "WHERE lfa.id in (select id " +
                  "                   from   procindo " +
                  "                   where  month   =   09    and" +
                  "                          year    =   2019     and" +
                  "                          type=   indo );";
  
          return query;
      }
  
      private String updatenAfroPeriodeInLfa(){
          String query = "UPDATE  lfa " +
                  "set afromonth = 09, afroyear  = 2019 , afrotype = indo " +
                  "WHERE lfa.id in (select id " +
                  "                   from   procafro " +
                  "                   where  month   =   09    and" +
                  "                          year    =   2019     and" +
                  "                          type=   afro );";
  
          return query;
      }
  </code></pre>