because if you use Frames or if you have slow running requests users can
launch more than one thread which can cause memory corruption.
Here is how those three scopes are seen: -
SERVER � By all CFAPPLICATIONs on a single physical server.
APPLICATION � By all users in a single CFAPPLICATION
SESSION � By a single user in a single Session.
I have another suggestion go to our blog at http://www.webapper.net
<http://www.webapper.net/> and search for CFLOCK you will find a few
pointers there that may help.
Kind Regards - Mike Brunt
Webapper Services LLC
Web Site http://www.webapper.com
Blog http://www.webapper.net
Webapper <Web Application Specialists>
-----Original Message-----
From: cfhelp [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 6:37 AM
To: CF-Talk
Subject: RE: Application and Request scope
I read this and now I am questioning my Application.
I have been building a document Library system. The Application is shared
between all the sites using it by Virtual Directories.
I use session variables in the login.cfm to set the User information (GUID,
Directory, IsAdmin) after login authentication.
<cfset SESSION.Auth = StructNew()>
<cfset SESSION.Auth.Email = QryCheckLogin.Email>
<cfset SESSION.Auth.UserGUID = QryCheckLogin.UserGUID>
<cfset SESSION.Auth.LibraryGUID = QryCheckLogin.DocLibOwnerGUID>
<cfset SESSION.Auth.IsLoggedIn = 'YES'>
<cfset SESSION.Auth.Admin = '#App_Admin#'>
I am not locking the above.
Everything seems to be working when multiple users are on the site (on the
same website or sharing). I also named the Application dynamically by
<cfset AppName = #ListGetAt(CGI.HTTP_Host,'2','.')#>
<cfapplication name="DocumentLibrary#AppName#"
sessionmanagement="Yes"
setclientcookies="Yes"
sessiontimeout="#CreateTimeSpan(0,0,30,0)#"
applicationtimeout="#CreateTimeSpan(0,0,30,0)#">
Then I just use cfparam to set variables.
<cfparam name="App_DataSource" default="TheDatabase">
<cfparam name="App_DataBaseUser" default="TheUserName"><!---
<cfparam name="App_DataBasePass" default="ThePassword">
<cfparam name="App_Admin" default="NO">
<cfparam name="APP_Path" default="#expandPath('../../../../')#">
<cfparam name="APP_LibraryOwnerURL" default="#CGI.HTTP_Host#">
Should I use Application Variables?
Should I be locking them?
Rick
_____
From: Jim Davis [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 7:36 AM
To: CF-Talk
I explain this pretty thoroughly in my guide to CF variables here:
http://www.depressedpress.com/DepressedPress/Content/ColdFusion/Guides/V
< http://www.depressedpress.com/DepressedPress/Content/ColdFusion/Guides/V>
<http://www.depressedpress.com/DepressedPress/Content/ColdFusion/Guides/V%3E
>
ariables/Index.cfm
I'm sure other people have other (perhaps better) opinions but that
should give you the skinny at least.
Jim Davis
-----Original Message-----
From: Paul Wilson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2003 8:08 AM
To: CF-Talk
Subject: Application and Request scope
I've been reading a few threads that advise on storing various things
(that's a technical description btw) in the
application or request scope. Why is this a good idea and what things
should be stored there?
Thanks!
_____
[Todays
_____
[Todays
_____
[ Todays Threads
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

