title: How can we implement a nested transaction in JDBC?
body: <p>First let me explain you what I mean by a nested transaction.</p>
  
  <p>Example: say in the main class we call <code>method1</code> and create the customer using jdbc[Transaction1]. It is not commited yet. Now we call <code>method2</code> in the main class and create the account for the just created customer[Transaction2]. Now commit it. As per your explanation both these transactions will be treated as part of one transaction (as there can be a maximum of one transaction with a connection). Till here, if we compare the above scenario, it will be like <code>propagation_required</code> in <a href="http://en.wikipedia.org/wiki/Spring_Framework" rel="nofollow">Spring</a>. Is that correct?</p>
  
  <p>Now if we want to commit transaction2 only not the one. Then this scenario will be like <code>propagation_Nested</code> in Spring. Is that correct?</p>
  
  <p>How can we implement a nested transaction in JDBC if both my assumptions stated above are correct?</p>