OOPhoto - Refactoring "With Transaction" Methods To BaseService.cfc

<cffunction
	name="ExecuteWithTransaction"
	access="public"
	returntype="any"
	output="false"
	hint="I wrap the given method execution in a database transaction.">
 
	<!--- Define arguments. --->
	<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."
		/>
 
	<!--- Define the local scope. --->
	<cfset var LOCAL = {} />
 
	<!--- Wrap the method call in a transaction. --->
	<cftransaction action="begin">
 
		<!---
			Invoke the given method, passing along the
			arguments.
		--->
		<cfinvoke
			components="#THIS#"
			method="#ARGUMENTS.MethodName#"
			argumentcollection="#ARGUMENTS.MethodArguments#"
			returnvariable="LOCAL.Return"
			/>
 
	</cftransaction>
 
	<!--- Return value. --->
	<cfreturn LOCAL.Return />
</cffunction>

For Cut-and-Paste