What do you see is the danger there, that an update to the local transfer
variable would update the variables.transferBean original object?  I don't
see how that's possible, given that it has been scoped locally (regardless
of passing by reference).  Ultimately, this is the precise issue I'm trying
to clarify.  But what you're saying is that *this* usage of local scoped
vars is NOT thread safe?  Can that be true?

Kevin


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of David Ross
> Sent: Friday, September 24, 2004 4:12 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Testing Thread Safety
> 
> 
> I'd say that's NOT thread safe, as the local var is only a 
> pointer to the variables instance. Two simultaneous requests 
> will both have separate variables, but since they're both 
> pointing at the same thing, it won't make a difference. You 
> need to instantiate your transfer bean component into the 
> local var "scope".
> 
> -Dave
> 
> >>> [EMAIL PROTECTED] 9/24/2004 7:16:09 AM >>>
> 
> > 
> > I am not "positive"... but doesn't a object (like a CFC) get
> > passed by ref? Does it recreate transferBean in var scope as 
> > transfer... or does transfer just get assigned the reference 
> > of the object... allowing both variables to address the same object?
> 
> This is exactly the question.  I can and will test it of 
> course, but I was wondering if it was a known behavior one 
> way or the other.  With all the hooha about local scoping 
> vars in functions, I would presume that doing the <cfset var 
> transfer = variables.transferBean> WOULD be ok.  Thought the 
> braintrust would have an answer on this.
> 
> Kevin
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[EMAIL PROTECTED]
> 


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to