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
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
. 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
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
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
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
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
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
...@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
. 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
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
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
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
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
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
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
,
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
|||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
.
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
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
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
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
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
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
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
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
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
=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
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
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
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
,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
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
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
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
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
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
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
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
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
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
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
?
-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
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
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
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
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
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
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
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
65 matches
Mail list logo