tags:

views:

128

answers:

2

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?

A: 

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

Romain Hippeau
A: 

You want to modify the starting order of the application:

http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.nd.multiplatform.doc/info/ae/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".

bkail
That will work if everything is running in the same instance.
Romain Hippeau
Agreed. That was my reading of the first sentence...
bkail