简体   繁体   English

Websphere中的应用程序启动状态

[英]Application startup status in Websphere

I have a web application deployed in Websphere. 我在Websphere中部署了一个Web应用程序。 At server startup, I am trying to load some values from database through ServletContextListener. 在服务器启动时,我试图通过ServletContextListener从数据库加载一些值。 If any exception occurs at that time, I want the web application start up status as failed. 如果此时发生任何异常,我希望Web应用程序启动状态为失败。

In order to achieve this, I am throwing a Runtime exception from ServletContextListener. 为了实现这一点,我从ServletContextListener抛出一个运行时异常。 This is working fine on Tomcat as it is not starting the webapp. 这在Tomcat上工作正常,因为它没有启动webapp。 But, on Websphere, the application start up status is showing as Success. 但是,在Websphere上,应用程序启动状态显示为Success。

Please let me know the way to handle this for a normal webapp, which does not use EJBs. 请让我知道为普通的webapp处理这个问题的方法,它不使用EJB。

The section Application Status list all avaiable status. 应用程序状态 ”部分列出了所有可用状态。 You can notice there is no fail or something like that. 你可以注意到没有fail或类似的东西。 Websphere does not support the behavior that you expected in 8.x or older version. Websphere不支持您在8.x或更早版本中所期望的行为。

There is a discussion : Stop application on servlet initialization failure . 有一个讨论: 停止servlet初始化失败的应用程序 It mention a possible solution but the customize implementation is not released yet. 它提到了一个可能的解决方案,但定制实现尚未发布。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM