Andrew,
Thanks for the response.  I completely understand what you are saying so I
think I misphrased my question.  Let's try an example and I'll show you what
I mean....

Let's say you set an Application variable "Application.DSN" under the
application named "MyApp". Assuming everything is setup correctly in
Application.cfm and <cfapplication>, the variable is created and will not
time out until "MyApp" expires. Now here is where I get confused.  For
Application and Session variables, you are supposed to lock them because
they are shared by each instance (i.e., browser) that is currently using
your app.  But, since these variables are supposed to be set seperately for
each set of unique tokens, why is looking necessary.  For example, if I
login as a user and it sets a variable called "Session.ID" to 101, how could
this be overwritten or used by another user since it is specified by the
unique token pair.

Make anymore sense?  I know I got away from the original question but this
is closer to what I want to know.

Thanks,
Jason

----- Original Message -----
From: "Andrew Tyrone" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 3:17 PM
Subject: RE: Request vs. Application scope


> > -----Original Message-----
> > From: Jason Lotz [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, April 19, 2001 4:25 PM
> > To: CF-Talk
> > Subject: Request vs. Application scope
> >
> >
> > I have noticed that I can easily interchange the use of Application and
> > Request scoped variables.  Both are easily accessible in custom
> > tags and are
> > only exist for the current http request.  So, what are good reasons to
use
> > one instead of the other?
> >
> > Jason
>
>
> Application variables are actually good for all requests for the life of
the application (set in the cfapplication tag with the applicationtimeout
attribute).  Request variables are only good for the lifetime of the page
that gets called (including any cfinluded files and custom tags, nested or
not).  Application variables are available to all users and only have to be
set once, unless the application times out.  In this case, they can be set
again, and checked beforehand with IsDefined() so as not to set them when
you don't need to.  Read up on session management in the ColdFusion
documentation.
>
>
> - Andy
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to