You are on CFMX, are you absolutely certain you need the cflock?  If
so, I suggest clocking only what you need and using the scope
attribute too.  Something like this.

<cflock name="addProgram" timeout="15">
<cfinvoke component="components.engineer_skill" method="checkProgram"
returnvariable="checkProgram" argumentcollection="#FORM#">
<cfif checkProgram.RecordCount NEQ 0>
<cflock scope=session" timeout="15">
<cfset SESSION.message = "The program you selected has already been
added to this skill.">
</cflock>
<cfelse>
<cfinvoke component="components.engineer_skill" method="insertProgram"
argumentcollection="#FORM#">
<cfinvokeargument name="SKILLSET_ID" value="#SESSION.SKILLSET_ID#">
</cfinvoke>
<cflock scope=session" timeout="15">
<cfset SESSION.message = "You have successfully added a program.">
</cflock>
<cflocation url=""> addtoken="no">
</cfif>



----- Original Message -----
From: Adrienne Brown <[EMAIL PROTECTED]>
Date: Fri, 24 Sep 2004 15:26:21 -0400
Subject: cflocation inside of cflock?
To: CF-Talk <[EMAIL PROTECTED]>

Quick question...If I put a cflocation tag inside of a cflock tag,
will it prevent the lock from being released? Here's an example
situation:

<cflock name="addProgram" timeout="15">
<cfinvoke component="components.engineer_skill" method="checkProgram"
returnvariable="checkProgram" argumentcollection="#FORM#">
<cfif checkProgram.RecordCount NEQ 0>
<cfset SESSION.message = "The program you selected has already been
added to this skill.">
<cfelse>
<cfinvoke component="components.engineer_skill" method="insertProgram"
argumentcollection="#FORM#">
<cfinvokeargument name="SKILLSET_ID" value="#SESSION.SKILLSET_ID#">
</cfinvoke>
<cfset SESSION.message = "You have successfully added a program.">
<cflocation url=""> addtoken="no">
</cfif>
</cflock>

Should I end the lock before doing the
cflocation?________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to