以确定的顺序在 tomcat 中启动 webapps [英] Start webapps in tomcat in a determinate order

查看:12
本文介绍了以确定的顺序在 tomcat 中启动 webapps的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 2 个网络应用程序:

I have 2 webapps:

WebApp 2 依赖于 WebApp 1

WebApp 2 depends from WebApp 1

如果 WebApp 1 未运行,WebApp 2 将失败

If WebApp 1 is not running, WebApp 2 fails

我可以在 tomcat 中定义我总是希望 webapp 1 在 webapp 2 之前启动吗?

Can I define in tomcat that I always want that webapp 1 starts before webapp 2?

推荐答案

根据 Apache wiki(位于 http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q27):

According to the Apache wiki (at http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q27):

没有预期的启动顺序.既不是 Servlet 规范也不是 Tomcat定义一个.你不能依赖这些应用程序以任何特定顺序开始.

There is no expected startup order. Neither the Servlet spec nor Tomcat define one. You can't rely on the apps starting in any particular order.

这篇关于以确定的顺序在 tomcat 中启动 webapps的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆