> If you were to just write in a page <cfset application.
> Counter._counter = application.Counter._counter + 1 />   
> (I know that's horrible and you would never do that but 
> nevermind that for a second) rather than calling a method 
> in the CFC then you would need <cflock> that write. But 
> calling the CFC method writes to the same variable, and 
> (am I wrong about this?) there's no need to <cflock> the 
> write in the increment() function. Is Java taking care of 
> the concurrency issue here for me?

To the extent that you're concerned about concurrent access to that variable
modified within the CFC method, yes, you are wrong about this. Either the
CFC needs to implement locking, or (better yet), the method call needs to be
locked.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word '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