I have a java jar running on windows server 2012 r2. I have created a task to run this jar on every restart of the server. Now, I need to restart the application whenever its stopped because of some reason. So I should find a way to find the status of the application.
Asked
Active
Viewed 1,270 times
1 Answers
0
A typical way to handle problems of this sort is with a service wrapper application, of which there are many, each with particular features. Popular examples include Tanuki, YAJSW, and Procrun, among others. These wrappers have built-in facilities to monitor and keep alive the applications they govern.
If you just want to check whether the application is running, then a common approach is to send probes to some TCP port that it exposes. Many applications open a port specifically for this purpose.

Kevin Boone
- 4,092
- 1
- 11
- 15