It's a little hard to figure out what you're doing without seeing your code...

<cfset VAR mh = getMH() />

That creates a local reference to whatever getMH() returns. We'd need
to see the body of getMH() to answer the rest of your questions I
think.

On 10/25/05, Ryan Guill <[EMAIL PROTECTED]> wrote:
> 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...


----------------------------------------------------------
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