title: How to specify @lock timeout in spring data jpa query?
body: <p>How to specify <code>@Lock</code> timeout for query?
  I am using Oracle 11g, I hope I can use something like <code>'select id from table where id = ?1 for update wait 5'</code>.</p>
  
  <p>I defined method like this:</p>
  
  <pre><code>@Lock(LockModeType.PESSIMISTIC_WRITE)
  Stock findById(String id);
  </code></pre>
  
  <p>It seems to lock forever.
  When I set <code>javax.persistence.lock.timeout=0</code> in <code>LocalContainerEntityManagerFactoryBean.jpaProperties</code>, there is no effect.</p>