应用程序超时时如何重新启动Coldfusion Application Server?

2024-06-18

当应用程序超时时,有没有办法通过Application.cfc重新启动CF服务器?根据 Adob​​e 文档,它们显示如下:

<cffunction name="onApplicationEnd">
    <cfargument name="ApplicationScope" required=true/>
    <cflog file="#This.Name#" type="Information" 
        text="Application #Arguments.ApplicationScope.applicationname# Ended" >
</cffunction>

我想做的是更换<cflog>上面有<cfexecute>如下:

<cfexecute name = "C:\CFRestart.bat"
    outputFile = "C:\output.txt"
    timeout = "1">
</cfexecute>

So OnApplicationEnd将运行CFRestart.bat当应用程序超时时归档。这可能吗?


onApplicationEnd 是不太可能达到 http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7d39.html#WSAF989AD4-912A-4727-B7BF-19CF200E1538除非您有一个非常安静的应用程序,因为每次有人访问该应用程序时,超时都会重置。

使用应用程序重新启动 Coldfusion 实例我会感到非常不舒服。我可以看到各种可怕的安全问题等迫在眉睫。老实说,我不太确定如果应用程序结束,为什么要重新启动服务器。

另外,根据文档, onApplicationEnd 在服务器重新启动时被调用,因此,如果您确实做到了这一点,那么当您重新启动服务器时,应用程序也会尝试重新启动服务器。这会变得非常混乱。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

应用程序超时时如何重新启动Coldfusion Application Server? 的相关文章

随机推荐