title: Informix retain update lock option through Spring
body: <p>In Informix, there are isolation levels similar to all other databases. But to use pessimistic locking, or select for update option, we have to add an extra option <em>RETAIN UPDATE LOCKS</em> while setting isolation level. Find documentation <a href="http://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_1169.htm" rel="nofollow noreferrer">here</a></p>
  
  <pre><code>SET ISOLATION TO COMMITTED READ RETAIN UPDATE LOCKS
  </code></pre>
  
  <p>This feature is kind of unique to Informix. In our application, default isolation is <em>DIRTY READ</em>. But we want some of the calls to be in <em>COMMITTED READ</em> isolation. For that we use <a href="http://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/annotation/Transactional.html" rel="nofollow noreferrer">@Transactional</a> of Spring.</p>
  
  <p>But unfortunately, through Spring we could not find a way to set above option <em>RETAIN UPDATE LOCK</em>. How we can achieve this using Spring or do we have any work around?</p>