Effect of cftransaction rollback along with multiple cftransaction commits

220 Views Asked by At

Within a cftransaction block, what does rollback do when I have multiple commit actions?

<cftransaction>
  <cftry>
    <cfquery ...>
    <cfquery ...>
    <cftransaction action="commit" />
    <cfquery ...>
    <cfquery ...>
    <!--- Everything went fine --->
    <cftransaction action="commit">
  <cfcatch>
    <cftransaction action="rollback">
  </cfcatch>
  </cftry>
</cftransaction>

If there is an error caught, will the rollback cancel everything all the time, or only back to the last commit action?

Note that this is existing code written by others. I'm just trying to make sure it works as is and how.

The database runs under Oracle 11g if this should change the behavior.

0

There are 0 best solutions below