Restart application without restarting server?

If you are using Application. Cfc, you can update it so that you can force a call to onApplicationStart() if something specific is passed in the url, or something similar. Simply place a check for that magic token in onRequestStart(), and call onApplicationStart() if it is.

If you are using Application. Cfc, you can update it so that you can force a call to onApplicationStart() if something specific is passed in the url, or something similar. Simply place a check for that magic token in onRequestStart(), and call onApplicationStart() if it is.

If you are not, you can try @Marcos's suggestion. I'm not sure what ramifications that may have in your application. What I would suggest is actually renaming your application, so it starts as a new app.

If you're on CF9, run ApplicationStop() cfquickdocs.com/cf9/#applicationstop.

2 This is the only 'correct' solution (and you have to be on CF9). Everything else is a dubious workaround with potential thread safety issues. – Sean Corfield Jun 25 '10 at 22:34 Is this how you get so many points Henry?

Post a question and answer it yourself? I'm on to you :) – Aaron Greenlee Jun 25 '10 at 23:05 LOL, I didn't ask this question. I just reworded it from 'start' to 'restart'.

– Henry Jun 25 '10 at 23:20.

If you do: From the application you want to restart, all variables will be reset, and re-created as soon as you hit the application again. Let me know if that's what you need. Cheers.

Cool, I'll have to try this. – Henry Jun 25 '10 at 17:01 1 This can have unexpected side effects, it's not recommended if you have access to onApplicationStart/Stop. Same goes for clearing the session with structClear() – David Collie Jun 25 '10 at 18:58.

Here you go, my CF7/8 version of CF9's ApplicationStop. I believe this is thread safe, noting Sean's comment. As mentioned by Henry, he's my blog post on the subject: misterdai.wordpress.com/2010/06/14/cf-fl....

RT @misterdai I have a blog post about it, a CF7/8 version of ApplicationStop() and ApplicationRestart() misterdai.wordpress.com/2010/06/14/cf-fl....

If that link goes away this answer is absolutely worthless. – Al Everett Nov 29 '11 at 20:22.

I usually put a reference to each user's session into a struct in my Application scope to monitor what's going on in the app. Maybe doing something similar in the Server scope could help here. Try: Then you'd have a reference to the actual Application object outside the scope of that application.

You could try all manner of destructive things to get rid of it. Try this at your own risk! And do it on a dev server before you do it on your production box.

;).

1 I don't think running onApplicationEnd() will do anything useful in terms of causing an application to restart. On CF8 / CFMX7, calling onApplicationStart() is the closest you'll get to the behavior you want - but beware that it won't be thread safe: CF automatically single threads calls to onApplicationStart() WHEN IT CALLS IT but you can't do that when you call it. On CF9, applicationStop() is the correct way to do this.

– Sean Corfield Jun 25 '10 at 22:33.

– Henry Jun 25 '10 at 17:49 Made suggestion visible. :-\ Use the preview. Also, that suggestion had already been given.

If you agree, vote that suggestion up. Don't re-submit it. – Ben Doom Jun 25 '10 at 20:54.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions