Dan, You can put reactor factory in the application scope with no problem. João Fernandes
-----Original Message----- From: [EMAIL PROTECTED] on behalf of Dan Vega Sent: Sun 09-Jul-06 12:28 AM To: [email protected] Subject: Re: [Reactor for CF] Related Objects Overwrite previous recorrd Wait one more quick question. Would reactor itself be considered a stateful object, or would that instance be ok if set in application scope, it just seems silly to me to keep loading config files for reactor? On 7/8/06, Dan Vega <[EMAIL PROTECTED]> wrote: > > Thanks for the advice Sean, and thank you to everyone for the help. > > On 7/8/06, Sean Corfield <[EMAIL PROTECTED] > wrote: > > > On 7/7/06, Dan Vega <[EMAIL PROTECTED] > wrote: > > > <cfif form.userId NEQ "0"> > > > <!--- this lets us know we are updating an existing record, if > > 0 add > > > new record ---> > > > <cfset application.UserRecord.setUserId (form.UserId > > > )> > > > <cfelse> > > > <cfset application.UserRecord.setUserId()> > > > > <cfset application.UserRecord.setUserId(0)> > > > > > </cfif> > > > > However, as others have pointed out, you should not put transient > > objects in application scope. > > > > Application scope is for services and things that have no state (i.e., > > don't change over time - except for caching). A UserRecord is, by > > definition, a stateful object. If you create a fresh UserRecord object > > for each request, you'll be just fine. > > -- > > Sean A Corfield -- http://corfield.org/ > > Got frameworks? > > > > "If you're not annoying somebody, you're not really alive." > > -- Margaret Atwood > > > > > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > > -- -- -- > > Reactor for ColdFusion Mailing List > > [email protected] > > Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > > -- -- -- > > > > > > > -- > > Dan Vega > [EMAIL PROTECTED] > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > -- -- > Reactor for ColdFusion Mailing List > [email protected] > Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > -- -- > -- Dan Vega [EMAIL PROTECTED] -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
<<winmail.dat>>
