As Dale said, this can have undesired results if used in the wrong
situation. However in my case, and not everyone is the same in this regard.
But I only use that method on my development server, and prefer to have a
temp file that is deleted when it is executed to restart the application
when changes have been made to the Application.cfc which is very rare for my
current clients work.



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Thursday, 7 June 2007 1:01 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

Yes,

 

Andrew's method of restarting the application is a good one. Beats
restarting CF.

 

Mind you be careful as to what url you need to pass the application to cause
a restart, obviously if this got in the wrong hands.

 

You can have a totally separate page if you wish, that takes some type of
password.

 

http://www.site.com/appRestart.cfm

 

This could ask for a password and restart the app by calling the Application
methods Andrew used.

 

This way the method of restarting your app doesn't end up in browser caches
etc, at least not the password bit.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:51 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

Dale,

I put the application scope on top of the page then it works. Maybe I should
do it as Andrew suggested. Thanks everyone.

On 07/06/07, Dale Fraser <[EMAIL PROTECTED]> wrote:

Are you sure it got created.

 

Possibly added the OnApplicationStart code after the app was already
started.

 

Dump the Application scope and see of the surveyDAO exists in it.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

Hi,

I create an object in Application.cfc and put it in the application scope.
When I use it in other pages it comes up this error:


Element SURVEYDAO is undefined in a Java object of type class
[Ljava.lang.String; referenced as



The object in application.cfc:
    <cffunction name="OnApplicationStart">
        <cfset Application.surveyDAO =
createObject("component",variables.componentPath &
".components.surveyDAO").init(variables.dsn) />
        <cfset Application.hrSurveyObj = CreateObject("component","
CFC.DataMgr").init("HR","MSSQL") />
    </cffunction>

The code causing the error:
<cfset Application.surveyDAO.delete(url.userID) />

Please help!

George

 

 

 



 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to