title: How is exception handled in transactional context with finally block?
body: <p>If i have transactional method like the one below, when is the finally block executed in case of transaction commit and rollback? For example if "persist some entity in database with hibernate" throws some hibernate exception which is true?</p>
  
  <p>1) transaction rollback
  2) finally block is executed</p>
  
  <p>or </p>
  
  <p>1) finally block is executed
  2) transaction rollback</p>
  
  <pre><code>public void someTransactionalPersist(...) {
       try {
       // persist some entity in database with hibernate
       } finally {
          // do something 
       }
  }
  </code></pre>