I might be wrong here, but in the past, i have had problems with StructClear(SESSION) as it deleted the CFID and CFTOKEN. This has caused odd behavior in my applications and I know use a method SessionClear(SESSION):
 
 
for (i in SESSION){
    if (CompareNoCase(Left(2, i), "CF")){
        // Safe to delete since it doesnt start with CF
        StructDelete(SESSION, i);
    }
}
 
 
Of course this only works if you dont have other variables in session starting with CF.
......................
Ben Nadel
Web Developer
Nylon Technology
350 7th Ave.
Suite 1005
New York, NY 10001
212.691.1134 x 14
212.691.3477 fax
www.nylontechnology.com

Sanders: Lightspeed too slow?
Helmet: Yes we'll have to go right to ludacris speed.
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Baz
Sent: Thursday, January 12, 2006 11:23 AM
To: [email protected]
Subject: RE: [CFCDev] making objects accessible in multiple pages

Stephen,

 

You seem to be doing it right. Your only problem is when the CFC code changes, which wouldn’t really happen in a production environment. So in my development environment I check for the URL var “reset” and re-initialize all session vars if it exists so I don’t have to keep restarting the server.

 

<cfif isDefined('url.reset')>

            <cfscript>

                        StructClear(session);

                        StructClear(application);

                        onApplicationStart();

                        onSessionStart();

            </cfscript>

</cfif>

 

Baz

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Adams
Sent: Thursday, January 12, 2006 11:16 AM
To: [email protected]
Subject: [CFCDev] making objects accessible in multiple pages

 

Hi,

I've just created my first Object Factory (which I'm very proud of), I've set the returned object in a session variable so that it it available in multiple pages, especially the data access object I've created. One problem I've found is that when I make a change to the cfc, these changes are not reflected.
I closed the browser, as I'd hoped that it would clear the session variable, but that did not work. Eventually I had to restart ColdFusion to clear the object.
What's the best way to create an object, which you'd like to be accessible in multiple pages?

Stephen
----------------------------------------------------------
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).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

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

An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ----------------------------------------------------------
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).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to