开发者

Grails: how to stop application started with "run-app prod" without "kill"

Is there such a possibility?

Would love Tomcast to persist session 开发者_C百科data on shutdown.


Create a file called .kill-run-app in the root directory of the project (use touch in Linux/OSX or just create an empty file) and it will cleanly shut down. I'm not sure if sessions are serialized though.


Please make sure you don't run your application in production using grails run-app. It is only intended for development. Instead, you should create a war file grails war and deploy it in your web container (tomcat). Production is the default environment used when creating a war file. You can also use grails run-war to test that application works as expected from the packaged WAR file but again, this is not suitable for production.


If you run kill -TERM you send the process a signal to do a clean shut down. I would have thought Tomcat would persist session data before doing so.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜