> The longer answer is that if the value is going to be the same for
everybody
> using the application, you should store it as a "constant" by putting it
> into the local Variables scope within application.cfm, or even better, the
> Request scope:
>
> <cfset Request.ds = "something_dev">

I'm unfamiliar with the request scope and can't seem to find it in any of my
docs. Where is a request-scope var stored?

~~~~~~~~~~~~~~~~~~~~~~~~
Ricq Pattay <[EMAIL PROTECTED]>
Univ of Minnesota - Twin Cities
College of Veterinary Medicine



----- Original Message -----
From: Dave Watts <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, August 29, 2000 3:45 PM
Subject: RE: CFLOCK datasource var?


> > In my application.cfm I set a session var for all my queries'
> > datasource like this:
> >
> > <cflock scope="session" timeout="30" type="exclusive">
> >  <cfset session.ds = "something_dev">
> > </cflock>
> >
> > So... Do I need to read-only lock every reference to
> > session.ds in all my other templates where I have a query
> > using that datasource session var? e.g.,
> >
> > <cfquery name="get_year" datasource=#session.ds#>
> > select sysdate from dual
> > </cfquery>
> >
> > Since session.ds is always identical for every user of this
> > site, what does it matter if it's locked or not?
>
> The short answer is, yes, you should lock it, because there's a potential
> for memory corruption with multiple concurrent reads, which can occur even
> with session variables.
>
> The longer answer is that if the value is going to be the same for
everybody
> using the application, you should store it as a "constant" by putting it
> into the local Variables scope within application.cfm, or even better, the
> Request scope:
>
> <cfset Request.ds = "something_dev">
>
> There's no reason to store this on a per-user basis in memory unless each
> user actually gets a different datasource.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> voice: (202) 797-5496
> fax: (202) 797-5444
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to