title: Does ormLite callInTransaction lock the database?
body: <p>I was wondering if ormLite locked the database when it executed a transaction. I have table:</p>
  
  <pre><code>key | value
  AA  | 1
  BB  | 1
  </code></pre>
  
  <p>I have two database operations running. One modifies multiple entries:</p>
  
  <pre><code>new Callable&lt;Void&gt;() {
      public Void call() throws SQLException {
          pairAA = new DbEntry("AA", 2);
          pairBB = new DbEntry("BB", 2);
          dao.createOrUpdate(pairAA);
          dao.createOrUpdate(pairBB);
  
          return null;
      }
  }
  </code></pre>
  
  <p>If I try to run the first on different thread, using <code>TransactionManager.callInTransaction()</code> is it possible to get 3 as a result of <code>sumAllValues(dao.queryAll())</code>? Running on different threads means the JVM may try to execute <code>queryAll()</code> between <code>createOrUpdate(pairAA)</code> and <code>createOrUpdate(pairBB)</code>. Which would mean AA becomes 2, BB is still 1 when the query reads it. Or would the transaction manager lock that table/database for the whole execution of the callable, making it impossible for the query to happen (only allowing it before or after the callable)?</p>