<cffunction
name="ExecuteWithTransaction"
access="public"
returntype="any"
output="false"
hint="I wrap the given method execution in a database transaction.">
<cfargument
name="MethodName"
type="string"
required="true"
hint="I am the method that is going to be executed."
/>
<cfargument
name="MethodArguments"
type="struct"
required="true"
hint="I am the arguments being passed to the method."
/>
<cfset var LOCAL = {} />
<cftransaction action="begin">
<cfinvoke
components="#THIS#"
method="#ARGUMENTS.MethodName#"
argumentcollection="#ARGUMENTS.MethodArguments#"
returnvariable="LOCAL.Return"
/>
</cftransaction>
<cfreturn LOCAL.Return />
</cffunction>