Websphere Java 应用程序启动
我有两个 Java 应用程序在 Websphere 应用程序服务器上运行。 第一个应用程序是 COTS 软件 (Plateau),我将其称为 App1,并包含一个 API,可在自定义应用程序中使用该 API 来与 App1 进行交互。此应用程序需要几分钟才能在 Websphere 中启动。 第二个应用程序是自定义软件,我将其称为 App2,并部署为 Web 服务,利用 App1 API 与 App1 进行交互;所以它依赖于App1。该应用程序只需几秒钟即可在 Websphere 中启动。
当我们反弹 Websphere 并且在 App1 应用程序完全启动之前客户端调用 App2 Web 服务时,我在某些 App1 功能中遇到了问题。
有没有办法可以延迟 App2 的启动,直到 App1 在 Websphere 中完全启动? 有没有办法设计 App2 在尝试使用 API 之前以编程方式检查 App1 是否可用?
I have two Java applications running on a Websphere application server.
The first application is COTS software (Plateau) I will call App1 and includes an API which can be used in custom applications to interact with App1. This app takes a couple minutes to start in Websphere.
The second application is custom software I will call App2 and is deployed as a web service which utilizes the App1 API to interact with App1; so it is dependent on App1. This app takes just seconds to start in Websphere.
I run into a problem in certain App1 functionality when we bounce Websphere and the App2 web service is called by a client before the App1 application has fully started.
Is there a way I can delay App2 from starting until App1 is fully started in Websphere?
Is there a way to design App2 to programmatically check that App1 is available before it attempts to use the API?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 WebSphere 中的 MBean 来判断服务器是否正在运行。
请参阅下面的帖子,Leigh Williamson 还写了一本书,如果您打算对此 API 进行编程,那么这本书是必读的。 ( http://www.amazon.com/WebSphere-System-Administration-Leigh-Williamson /dp/0131446045/ref=sr_1_2?ie=UTF8&s=books&qid=1274819891&sr=1-2 )
您可以在这里获取很多信息... http://sysdoc.doors.ch/IBM/0304_TechJournal.pdf
You can use the MBeans within WebSphere to tell if a server is running or not.
See the post below, Also Leigh Williamson has written a book that is a must if you are going to program to this API. ( http://www.amazon.com/WebSphere-System-Administration-Leigh-Williamson/dp/0131446045/ref=sr_1_2?ie=UTF8&s=books&qid=1274819891&sr=1-2 )
You can get a lot of info here... http://sysdoc.doors.ch/IBM/0304_TechJournal.pdf
您想要修改应用程序的启动顺序:
https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/trun_app_startup.html
默认情况下,所有应用程序的启动顺序相同,并且默认情况下,应用程序是并行启动的。通过更改其中一个应用程序的启动顺序,您可以确保它在另一个应用程序之前(或之后)启动。
如果您正在查看旧版本产品的信息中心,您需要搜索“起始重量”而不是“起始订单”。
You want to modify the starting order of the application:
https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.multiplatform.doc/ae/trun_app_startup.html
By default, all applications have the same starting order, and by default, applications are started in parallel. By changing the starting order of one of the applications, you can ensure that it starts before (or after) the other.
If you're looking at the InfoCenter for an older version of the product, you want to search for "starting weight" instead of "starting order".