【问题标题】:Heroku Java Tomcat ServletContextListener not calling contextDestroyed on slugc or restartHeroku Java Tomcat ServletContextListener 没有在 slugc 上调用 contextDestroyed 或重新启动
【发布时间】:2013-01-25 08:22:34
【问题描述】:

Heroku 使用 SIGTERM 允许进程正常关闭。但是,Tomcat 进程不响应 SIGTERM,并且从不在我的 ServletContextListener 上调用 contextDestroyed。

如何让 Tomcat 在 Heroku 重新启动或 Heroku 为我的应用程序进行 slug 编译时调用 contextDestroyed。

【问题讨论】:

    标签: tomcat servlets heroku sigterm


    【解决方案1】:

    你是对的。关闭挂钩未注册以触发 Tomcat 的正常关闭,因此上下文不会在关闭生命周期事件中循环。最新版本的 webapp-runner 修复了这个问题:https://github.com/jsimone/webapp-runner/issues/22

    【讨论】:

      猜你喜欢
      • 2016-02-24
      • 2021-08-25
      • 1970-01-01
      • 1970-01-01
      • 2016-03-15
      • 2010-12-15
      • 1970-01-01
      • 2012-09-04
      • 1970-01-01
      相关资源
      最近更新 更多