title: Transaction commit following rollback
body: <p>We have code I'm maintaining where I have something like this:</p>
  
  <pre><code>&lt;cftransaction&gt;
      &lt;cftry&gt;
          ... do some stuff here which may throw an exception ...
          &lt;cftransaction action="commit"&gt;
          &lt;cfcatch&gt;
              &lt;cftransaction action="rollback"&gt;
              &lt;cfif someCondition&gt;
                  &lt;cfset someFunctionThatAffectsTheDB() /&gt;
                  &lt;cftransaction action="commit" /&gt;
              &lt;/cfif&gt;
          &lt;cfcatch&gt;
      &lt;cftry&gt;
  &lt;/cftransaction&gt;
  </code></pre>
  
  <p>I'm a bit leery of the commit in the catch that happens after the rollback.  I've searched the interwebs for info on what might happen in such a case, but haven't found anything so far that would say what would happen if you try to commit after rolling back inside the same transaction block.  Does anyone know what this would do and whether it's ok to do or is a bad thing?</p>
  
  <p>(The reason I ask is because we have a data state in our db that I don't think should be possible and I'm wondering if the behavior of commit-after-rollback is undefined and subtle and could cause what I'm seeing.)</p>