Hi. I am cflocking the call to a component method because I'm passing in 
session variables, like so:

<CFLOCK SCOPE="SESSION" TIMEOUT="300" TYPE="exclusive">
        <CFINVOKE COMPONENT="LHF" METHOD="updateStatus" 
                                RETURNVARIABLE="mmhmm" 
ILASTACTIONUSER="#session.userName#" ...>
</CFINVOKE>
</CFLOCK>       

If I set a default session variable in the method itself, do I have to have a 
cflock inside the cffuntion too? I hope not, since the function does not seem 
to like cflocks in it:

<CFFUNCTION NAME="updateStatus" HINT="update the LHF_Header table with a new 
lastAction, lastActionDate, and lastActionUser" ACCESS="PUBLIC" OUTPUT="FALSE" 
RETURNTYPE="STRING">
<cflock here? It throws an error>
        <CFARGUMENT NAME="lastActionUser" TYPE="STRING" REQUIRED="YES" 
DEFAULT="#SESSION.userName#">
        
.....

        <CFSTOREDPROC DATASOURCE="#request.dsn#" PASSWORD="" 
PROCEDURE="updateStatus" USERNAME="">
        <CFPROCPARAM TYPE="IN" CFSQLTYPE="CF_SQL_varCHAR" 
DBVARNAME="lastActionUser" VALUE="#arguments.lastActionUser#">
        <cfprocparam TYPE="Out"  CFSQLTYPE="cf_sql_integer" DBVARNAME="@RetVal" 
VARIABLE="updateRetVal">
        <cfprocparam TYPE="Out" CFSQLTYPE="cf_sql_varchar" DBVARNAME="@RetMsg" 
VARIABLE="updateRetMsg"> 
                <cfprocresult NAME="myStatus">  
        </CFSTOREDPROC>
        <cfif updateRetVal eq 0>
          <CFRETURN "success">
        <cfelse>
         <CFRETURN myStatus>
        </cfif>
</cflock ?>

</CFFUNCTION>

Thanks in advance.

Andrew

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208227
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to