title: Spring - Transaction Readonly
body: <p>Just wanted your expert opinions on declarative transaction management for Spring. Here is my setup:</p>
  
  <ol>
  <li>DAO layer is plain old JDBC using Spring JdbcTemplate (No Hibernate etc)</li>
  <li>Service layer is POJO with declarative transactions as follows -
  <code>save*, readonly = false, rollback for Throwable</code></li>
  </ol>
  
  <p>Things work fine with above setup. However when I say <code>get*, readonly = true</code>, I see errors in my log file saying <code>Database connection cannot be marked as readonly</code>. This happens for all get* methods in service layer.</p>
  
  <p>Now my questions are:</p>
  
  <p>A. Do I have to set <code>get*</code> as readonly? All my <code>get*</code> methods are pure read DB operations. I do not wish to run them in any transaction context. How serious is the above error?</p>
  
  <p>B. When I remove the <code>get*</code> configuration, I do not see the errors. Morever, all my simple <code>get*</code> operations are performed without transactions. Is this the way to go?</p>
  
  <p>C. Why would anyone want to have transactional methods where <code>readonly = true</code>? Is there any practical significance of this configuration?</p>
  
  <p>Thank you! As always, your responses are much appreciated!</p>