hum. small question, I have 2 applications, one app ~administers~ the other. I can restart the admin application easily enough with onApplicationStart(); , but how can I restart the slave application???
-thanks
-sean
No answers?>?>?
can this even be done?
I would up setting a flag in the database and looking for it on a new session in the slave application....
<cfquery name="applicationReStart" datasource="#application.dsn#">
select value from Settings where name = 'ApplicationRestart';
</cfquery>
<cfif applicationReStart.value is "true" >
<cfquery name="update" datasource="#application.dsn#">
update Settings set
value = 'false'
where name = 'ApplicationRestart';
</cfquery>
<cfset onApplicationStart() />
</cfif>
hum. small question, I have 2 applications, one app ~administers~ the other. I can restart the admin application easily enough with onApplicationStart(); , but how can I restart the slave application???
I assume the slave application is in a subdirectory of the admin application. I also assume the slave application's Application.cfc is within that subdirectory. All that is needed is for the admin to open any cfm page in the slave application.
Hi;
thanks - yes, I was just thinging "webservice" after my last post there.,... my EXACT thought was:
admin app creates a key in the database table I already set up [something nasty like a cfid+big_long_random_string]
admin app posts the key, and an ident string to the remote webapp.
remote webapp checks the ident string, if it's good, checks the key against the one the admin app stored, if that's good = onApplicationStart();
that ought to be secure enough and keep kiddeis from hammering at the database
might be a good idea to even implement a timeout or something as well...
anyway .. thanks.
-sean
I would up having to do something like this:
<cfcomponent>
<cffile action="read"
file="#getDirectoryFromPath(getCurrentTemplatePath())#application-name"
variable="this.name" charset="utf-8" />
<cfscript>
//this.name = "newride-ss23fv3-grg346";
this.applicationTimeout = createTimeSpan(2,0,0,0);
this.clientmanagement= "yes";
this.loginstorage = "session" ;
in the administration there is a manual link and form to fill out to restart the application, basically it just regenerates the application-name file so that when application.cfc gets it's next request the application name has changed.
Just wondering if there are security issues or other problems that might be associated with doing things like this.
-thanks
-sean
North America
Europe, Middle East and Africa
Asia Pacific