Hey guys,

i just had a thought and need to know exactly how this works.

I have a component that I am using in composition in some of my other
components.  I have a messageHandler, which an object is being created
of in all of my daos.  In every method that runs, it inits() or resets
the object, the method uses the messageHandler methods, it then
returns the information stored in the message handler.  then the next
method that runs will init() and reset it again and the process
repeats.

I am createing an object out of the messageHandler in every dao when
the dao object is created and then the same messageHandler object is
being reused over and over.  I am bringing it into each method like so
<cfset VAR mh = getMH() /> and getMH() just returns the reference to
the object.

So my question is this: since i am using VAR inside each of the
methods, is it really creating it locally?  My worry is that it is not
even still, and so if one method of my dao starts to run, and another
method starts to run before the first one is completed will the init()
of the second method clear out the data of the first ones instance?

If so, then the only way I see around this is to create the
messageHandler object for each method, or put exclusive locks in every
method.  I hope this really isnt the case...

thanks,
--
Ryan Guill
BlueEyesDevelopment
[EMAIL PROTECTED]
www.ryanguill.com
(270) 217.2399
got google talk?  Chat me at [EMAIL PROTECTED]

The Coldfusion Open Application Library - COAL - http://coal.ryanguill.com

www.ryanguill.com/
The Roman Empire: www.ryanguill.com/blog/


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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


Reply via email to