Re: anyway to initialize ORM AFTER onApplicationStart()?

2015-03-19 Thread Jochem van Dieten
On Thu, Mar 19, 2015 at 12:22 AM, Yuliang Ruan wrote: current app sets the datasource in onApplicationStart(). i can't have ormEnabled=true unless there's a datasource.and it doesn't look like i can intialize orm at the end of onApplicationStart() by doing a this.ormEnabled=true

anyway to initialize ORM AFTER onApplicationStart()?

2015-03-18 Thread Yuliang Ruan
current app sets the datasource in onApplicationStart(). i can't have ormEnabled=true unless there's a datasource.and it doesn't look like i can intialize orm at the end of onApplicationStart() by doing a this.ormEnabled=true what are the alternatives? I'm thinking one where i set

Re: onApplicationStart and cfmail, when doess server start?

2014-04-02 Thread morchella
. onApplicationStart() isnšt triggered until the first request to the application. Check out onServerStart and Server.cfc http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WS7AC9408A-1AC6-4ab7- 9C8 E-CF1DA8FCA16D.html http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/W S7AC9408A

onApplicationStart and cfmail, when doess server start?

2014-04-01 Thread morchella
so i am trying some thing out on localhost befor i move to dev i want to know when my cf server was started or restarted. so after my onApplicationStart i put in a cfmail and fir up an instance of cf9 for my localhost. i dont get the email unless i actually goto 127.x.x.x to view a page. i

Re: onApplicationStart and cfmail, when doess server start?

2014-04-01 Thread John M Bliss
or restarted. so after my onApplicationStart i put in a cfmail and fir up an instance of cf9 for my localhost. i dont get the email unless i actually goto 127.x.x.x to view a page. i thought i should get it imeditaly when the server starts? how would or should i be doing this. thanks a bunch

Re: onApplicationStart and cfmail, when doess server start?

2014-04-01 Thread Rodney Enke
spent. On Tue, Apr 1, 2014 at 10:31 AM, morchella morchella.delici...@gmail.comwrote: so i am trying some thing out on localhost befor i move to dev i want to know when my cf server was started or restarted. so after my onApplicationStart i put in a cfmail and fir up an instance of cf9

Re: onApplicationStart and cfmail, when doess server start?

2014-04-01 Thread Bobby
The behavior you explained is expected. onApplicationStart() isn¹t triggered until the first request to the application. Check out onServerStart and Server.cfc http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WS7AC9408A-1AC6-4ab7-9C8 E-CF1DA8FCA16D.html On 4/1/14, 11:31 AM, morchella

Re: onApplicationStart and cfmail, when doess server start?

2014-04-01 Thread morchella
thanks guys! i was unfamilar with onServerStart. looking now! Much appreciated! On Tue, Apr 1, 2014 at 11:44 AM, Bobby bo...@acoderslife.com wrote: The behavior you explained is expected. onApplicationStart() isnšt triggered until the first request to the application. Check out

Re: onApplicationStart and cfmail, when doess server start?

2014-04-01 Thread morchella
...@acoderslife.com wrote: The behavior you explained is expected. onApplicationStart() isnšt triggered until the first request to the application. Check out onServerStart and Server.cfc http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WS7AC9408A-1AC6-4ab7-9C8 E-CF1DA8FCA16D.htmlhttp

Re: onApplicationStart and cfmail, when doess server start?

2014-04-01 Thread Bobby
. onApplicationStart() isnšt triggered until the first request to the application. Check out onServerStart and Server.cfc http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WS7AC9408A-1AC6-4ab7- 9C8 E-CF1DA8FCA16D.htmlhttp://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/W S7AC9408A-1AC6-4ab7-9C8E

Re: What event specifically triggers OnApplicationStart?

2011-03-30 Thread Dave Burns
Ian Skinner - I owe you an apology. After studying the access logs from the web server, I can't say with 100% certainty but it looks like this happened because someone hit the web server using an IP address. They didn't use the password to force a call to OnApplicationStart so it must have

What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dave Burns
In Application.cfc, I know that OnApplicationStart is called when an application starts. I'd like to define that better. From what I've read, this is when the first page is requested from an app (also possible are event gateways and Flash remoting but I'm not using either). So, if I say

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Russ Michaels
else set as dev ? On Mon, Mar 28, 2011 at 6:25 PM, Dave Burns cft...@burnsorama.com wrote: In Application.cfc, I know that OnApplicationStart is called when an application starts. I'd like to define that better. From what I've read, this is when the first page is requested from an app (also

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dave Burns
the applicationTimeout, if you force a restart via code or via the CFADMIN/server monitor To confirm my understanding, are you saying that on a very busy site, it's possible that OnApplicationStart might never run again once the app has started? (server admin and restarts aside.) Since the app

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dave Watts
To confirm my understanding, are you saying that on a very busy site, it's possible that OnApplicationStart might never run again once the app has started? (server admin and restarts aside.) That's exactly correct. Since the app is running fine for months and then all of a sudden switches

RE: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Bill Franklin
OnApplicationStart? memory variables only timeout if they are not accessed the specified timeout period. every time anyone loads a page on your site, it accesses the application scope and their session scope, so the timeout is reset back to 0. An application will restart when ColdFusion restarts, when

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Russ Michaels
, it's possible that OnApplicationStart might never run again once the app has started? (server admin and restarts aside.) That's exactly correct. Since the app is running fine for months and then all of a sudden switches configs, something else then must trigger a call to OnApplicationStart

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dan G. Switzer, II
that OnApplicationStart might never run again once the app has started? (server admin and restarts aside.) That's exactly correct. Since the app is running fine for months and then all of a sudden switches configs, something else then must trigger a call to OnApplicationStart

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dave Burns
It's entirely possible that (a) the server is stopping and restarting, which will cause all applications to stop, or (b) there's an explicit call to onApplicationStart somewhere within your code - this is actually pretty common. Dave - For the sake of argument, if the server is restarted

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dave Watts
Dave - For the sake of argument, if the server is restarted but no one hits a single page on the app, OnApplicationStart won't run right? So if it takes a page hit to call it, CGI should be defined, no? Yes, unless that page request comes through an event gateway I guess. I just grepped my

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dave Burns
I think I can see one possible cause of your problem Dave. You may actually have 2 applications running. one on yourdomain.com and another on www.yourdomain.com So if someone goes to yourdoamin.com and then www.yourdomain.com they will NOT be seeing the same application. So perhaps most people

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dave Burns
One thing to keep in mind, if you do not have a *unique *ApplicationName on your server, then the variables could be shared w/another application--which is especially dangerous on shared hosting. I've seen people roll out an application w/a common ApplicationName like MainApp and have issues

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dave Burns
OnApplicationStart, I can assume that CGI is defined and CGI.SERVER_NAME is also defined. The only thing I can say is that, assuming my theory is right, the value of CGI.SERVER_NAME does not contain blah.com when I think it should

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Ian Skinner
On 3/28/2011 11:10 AM, Dave Burns wrote: My code looks like this: configName = dev if CGI.SERVER_NAME contains blah.com configName = production Which means that if I (or any joker poking at your site to see if they can do something) who requests your site by its IP address could set

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dave Burns
your production server into dev mode. CGI.SERVER_NAME is probably populated, but it is populated by what I put into MY browser, just as long as that resulted in a request to YOUR server. Well, since that code is in OnApplicationStart, only if you either a) knew the secret URL param and value

RE: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Andrew Scott
Subject: Re: What event specifically triggers OnApplicationStart? Since I don't get an exception thrown within OnApplicationStart, I can assume that CGI is defined and CGI.SERVER_NAME is also defined. The only thing I can say is that, assuming my theory is right, the value of CGI.SERVER_NAME

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Dean Lawrence
Dave, Since your config is based on the cgi.server_name variable, why don't you search your web server access logs for calls to your dev domain name? This would tell you when and what was accessed which might have reset your app. Dean On Mon, Mar 28, 2011 at 4:00 PM, Dave Burns

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Justin Scott
Which means that if I (or any joker poking at your site to see if they can do something) who requests your site by its IP address could set your production server into dev mode. Not necessisarily, that would depend on how the web server was set to handle requests. One of my application has a

Re: What event specifically triggers OnApplicationStart?

2011-03-28 Thread Mark Mandel
Is it possible that someone is accessing your site by it's ip address, in an attempt to fool it into something that could enable a hacking attempt? I've seen security scanning software do similar things. This is why I tend to have the production state be the default state, and have development

Re: onApplicationStart

2010-08-04 Thread Matt Coldfusion
This doesnt work for me and I cannot work out why? I run onApplicationStart in application.cfc and all my old application variables still exist, i have to restart the service all the time but i can't do this on my shared server. What is another way besides creating a temp file

Re: onApplicationStart

2010-08-04 Thread Raymond Camden
for a url var and simply do onApplicationStart(); This will NOT single thread the call, but if you are just setting up a bunch of variables, you most likely do not need to be concerned. 3) I don't really recommend this, but you can also just rename the application. On Wed, Aug 4, 2010 at 2:56 PM, Matt

Re: onApplicationStart

2010-08-04 Thread Eric Cobb
Here's the poor mans answer to applicationStop(), it works on CF7 CF8. |||cfset| |application.setIsInited(false) / | See Mister Dai for a more detailed explanation: http://misterdai.wordpress.com/2010/06/11/cf-flag-application-to-run-onapplicationstart/ | | Thanks, Eric Cobb ECAR Technologies

Re: onApplicationStart

2010-08-04 Thread Eric Cobb
. |||cfset| |application.setIsInited(false) / | See Mister Dai for a more detailed explanation: http://misterdai.wordpress.com/2010/06/11/cf-flag-application-to-run-onapplicationstart/ | | Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com Raymond

Re: onApplicationStart

2010-08-04 Thread Larry Lyons
. hth, larry You can have a cfif looking for a url variable such as reset. Inside the CFIF you can recall the onapplicationstart method cfif structkeyexists(url, 'reset') cfset onapplicationstart() /cfif Personally, I'd go for a separate reset page. Why have a CFIF if it will rarely, if ever used

onApplicationStart Vs onRequestStart

2008-09-28 Thread Sherif Abdou
I am new to ColdFusion and I am having trouble understanding what is the Difference between onApplicationStart method and onRequestStart method other than the Scope. For Example what does it mean by Application? First time a user comes to your site? Does it only run once? I tried to set

Re: onApplicationStart Vs onRequestStart

2008-09-28 Thread Will Tomlinson
I am new to ColdFusion and I am having trouble understanding what is the Difference between onApplicationStart method and onRequestStart method other than the Scope. For Example what does it mean by Application? First time a onapplicationstart() runs when the first cfm or cfc is executed

Re: onApplicationStart Vs onRequestStart

2008-09-28 Thread Steve Nelson
OnApplicationStart runs the first time ANY user hits your site. It's commonly used for setting application variables that rarely change. Things like datasources are a good place for that or initializing a ton of cfobjects. I commonly put a cfif statement in my onRequest event to reset

Re: onApplicationStart Vs onRequestStart

2008-09-28 Thread s. isaac dealey
I am new to ColdFusion and I am having trouble understanding what is the Difference between onApplicationStart method and onRequestStart method other than the Scope. For Example what does it mean by Application? First time a user comes to your site? Does it only run once? I tried to set

Re: onApplicationStart Vs onRequestStart

2008-09-28 Thread Sherif Abdou
Oh Ok I found what the problem is, I guess my Varaibles in the onApplicationStart got cached, so when I sent it once, launched and then I added another Variables after launched again the application variables dont' get updated. Now How would i prevent it from getting cached? -- Sherif Abdou

Re: onApplicationStart Vs onRequestStart

2008-09-28 Thread James Holmes
The whole point of putting variables into the application scope is to cache them so you don't have to set them on every request. The reason your variables didn't get set after you added new ones was that your application had already started; OnApplicationStart doesn't run on every request

Re: onApplicationStart

2008-01-03 Thread Brian Kotek
You can just call onApplicationStart() again, but be aware that it won't be thread safe as it is when the application starts up. On Jan 3, 2008 3:01 PM, Adkins, Randy [EMAIL PROTECTED] wrote: Question: When using the onApplicationStart within an Application.cfc, lets say I wanted to restart

Re: onApplicationStart

2008-01-03 Thread Michael Dinowitz
You can have a cfif looking for a url variable such as reset. Inside the CFIF you can recall the onapplicationstart method cfif structkeyexists(url, 'reset') cfset onapplicationstart() /cfif Personally, I'd go for a separate reset page. Why have a CFIF if it will rarely, if ever used. On Jan

Re: onApplicationStart

2008-01-03 Thread Will Tomlinson
=application type=exclusive timeout=5 throwontimeout=true cfset onApplicationStart() /cflock /cfif /cffunction Then add ?reinitApp=1 in any url to restart the app Will ~| Adobe® ColdFusion® 8 software 8 is the most

Re: onApplicationStart

2008-01-03 Thread Barney Boisvert
the application, it just reinitializes it. So any pre-existing application variables will continue to exist unless your initialization explicitly overwrites or deletes them. cheers, barneyb On Jan 3, 2008 12:01 PM, Adkins, Randy [EMAIL PROTECTED] wrote: Question: When using the onApplicationStart

RE: onApplicationStart

2008-01-03 Thread Adkins, Randy
Sweet.. thanks -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Thursday, January 03, 2008 3:00 PM To: CF-Talk Subject: Re: onApplicationStart What is another way besides creating a temp file to explicitly reset those variables? Is there a way to make

Re: onApplicationStart

2008-01-03 Thread Mike Chabot
You can try putting most of your OnApplicationStart code into cfinclude files and call those cfinclude file in some other reload page. This has an advantage over calling OnApplicationStart again if there are some things that OnApplicationStart does that you don't want to do a second time

Re: onApplicationStart

2008-01-03 Thread Raymond Camden
,reinitApp) cflock scope=application type=exclusive timeout=5 throwontimeout=true cfset onApplicationStart() /cflock /cfif /cffunction Then add ?reinitApp=1 in any url to restart the app Will ~| Adobe

Re: onApplicationStart

2008-01-03 Thread Ian Skinner
You can also temporiarly set the session timeout to 0 or some other really short time, let the application expire, then return the timeout to the desired value. ~| Adobe® ColdFusion® 8 software 8 is the most important and

onApplicationStart

2008-01-03 Thread Adkins, Randy
Question: When using the onApplicationStart within an Application.cfc, lets say I wanted to restart the Application to pickup some changes. Now I know you can cycle the CF Services but I do not have that access to the server. What is another way besides creating a temp file to explicitly reset

Re: onApplicationStart

2008-01-03 Thread Sean Corfield
On Jan 3, 2008 12:24 PM, Raymond Camden [EMAIL PROTECTED] wrote: Just note though - that lock isn't really necessary if all you are doing is setting a bunch of simple values in the app scope. And by simple I mean things that dont' need to be single threaded. A CFC stored in the app scope is

Re: onApplicationStart cftry

2007-01-15 Thread Richard Cooper
It was pretty serious at the time. Seemed to be a problem with the JVM garbage collection but is sorted now. It affected a handful of sites connecting to the SQL server. One of them was failing on the connection storage for the client session varaibles, so I was thinking if this ever happened

onApplicationStart cftry

2007-01-14 Thread Richard Cooper
Hi, I've seen a few examples where this happens, but, I'm a little confused as to why you'd use cftry/cfcatch to test for a DB connection within onApplicationstart. Firstly, would this mean that until the application ends it would consider that the database is unreachable? Secondly, what

Re: onApplicationStart cftry

2007-01-14 Thread Raymond Camden
examples where this happens, but, I'm a little confused as to why you'd use cftry/cfcatch to test for a DB connection within onApplicationstart. Firstly, would this mean that until the application ends it would consider that the database is unreachable? Secondly, what happens when the DB

Re: onApplicationStart cftry

2007-01-14 Thread Richard Cooper
Gotcha. Thanks Ray. Do you know about the clientStorage bit? I had a problem a while back when I had DB problems and the storage of client and session variables. I'm pretrty sure that this was happening straight away in the first line of application.cfm, within the cfapplication tag. Where by

Re: onApplicationStart cftry

2007-01-14 Thread Raymond Camden
Well, if your client storage fails, thats pretty bad. To me it's the kind of thing you wouldn't try catch as it means a serious problem. On 1/14/07, Richard Cooper [EMAIL PROTECTED] wrote: Gotcha. Thanks Ray. Do you know about the clientStorage bit? I had a problem a while back when I had DB

can't get onApplicationStart to fire...

2005-02-11 Thread Bert Dawson
I can't seem to get onApplicationStart to run, nor onSessionStart, but on request start works fine. I'd be grateful if someone could caste an eye over my code to see if they can spot what i'm doing wrong: 2 files in a directory: Application.cfc and index.cfm

RE: can't get onApplicationStart to fire...

2005-02-11 Thread Calvin Ward
Are you restarting CF before you request index.cfm? -Original Message- From: Bert Dawson [mailto:[EMAIL PROTECTED] Sent: Friday, February 11, 2005 5:48 AM To: CF-Talk Subject: can't get onApplicationStart to fire... I can't seem to get onApplicationStart to run, nor onSessionStart

Re: can't get onApplicationStart to fire...

2005-02-11 Thread Bert Dawson
? -Original Message- From: Bert Dawson [mailto:[EMAIL PROTECTED] Sent: Friday, February 11, 2005 5:48 AM To: CF-Talk Subject: can't get onApplicationStart to fire... I can't seem to get onApplicationStart to run, nor onSessionStart, but on request start works fine. I'd be grateful if someone

RE: can't get onApplicationStart to fire...

2005-02-11 Thread Calvin Ward
Because if you don't restart CF then the Application is already started and onApplicationStart will never fire. The Application starts on the first browser request to the CF server after the CF server is started. Additionally, you may want to close and re-open your browser to get onSessionStart

RE: can't get onApplicationStart to fire...

2005-02-11 Thread Calvin Ward
Slight amendment The below should read Because if you don't restart CF then the Application is already started and onApplicationStart will never fire. The Application starts on the first request to the CF server that requests that Application.cfc (or another template that contains

Re: can't get onApplicationStart to fire...

2005-02-11 Thread Raymond Camden
You may also want to consider a very low app timeout while testing. You may also want to consider putting something like this in your onRequestStart: if isDefined(url.reinit) onApplicationStart() Unfortunately, this will only run you rmethod. It will not reset the Application like a true

Re: can't get onApplicationStart to fire...

2005-02-11 Thread Bert Dawson
session.startup should already be set, or its a new session, in which case it should be set. Or am i missing something? Bert On Fri, 11 Feb 2005 07:01:49 -0500, Calvin Ward [EMAIL PROTECTED] wrote: Because if you don't restart CF then the Application is already started and onApplicationStart will never fire

Re: can't get onApplicationStart to fire...

2005-02-11 Thread Bert Dawson
I'm confused now: I'm i right in thinking that onApplicationStart() should fire automatically when the application starts? And by application starting i mean the first time a cfapplication tag with a particular application name is run (assuming server has just restarted). If thats correct then i

RE: can't get onApplicationStart to fire...

2005-02-11 Thread James Holmes
Subject: Re: can't get onApplicationStart to fire... I'm confused now: I'm i right in thinking that onApplicationStart() should fire automatically when the application starts? And by application starting i mean the first time a cfapplication tag with a particular application name is run (assuming

Re: can't get onApplicationStart to fire...

2005-02-11 Thread Bert Dawson
Aha - thats what i was missing. So in order to use the onApplication and onSession methods you need to initialise the application in application.cfc, except instead of using the cfapplication tag you set the the parameters in the This scope. In other words, Application.cfc replaces both