-
Download and install Service Protector, if necessary.
-
Start Service Protector.
-
Select Protector > Add to open the Add Protector window:
-
On the General tab, in the Service to protect field, choose the WildFly windows service.
There will be a green circle on the left if WildFly is already running, as was the case on our server:
-
There are a few reports of WildFly occasionally
getting stuck in the "Stopping" state.
To have Service Protector automatically restart WildFly when that happens, click over to the Extras tab and check the corresponding option.
We suggest leaving the timeout at the default of 60 seconds, but you can reduce that value if your situation warrants a more aggressive stance. (Checking is cheap.)
-
Click the Save button. In a couple of seconds, an entry for WildFly will show up in the Service Protector window.
The WildFly service is probably already running but it is not yet being protected by Service Protector, hence the red shield on the "Protection" column:
-
To start protection, choose Protector > Start "Wildfly". After a couple of seconds, the shield icon will go to green to indicate that WildFly is being monitored by Service Protector:
Note that clicking on the green "Running" circle will show a few details of the service...
... and clicking the green shield will show how protection is doing:
-
That's it! Next time your computer boots, WildFly will start and Service Protector will begin monitoring the service to promptly restart it if it fails or stops for any reason.
We encourage you to edit WildFly in Service Protector and check out the many other settings that may be appropriate for your environment.
For example, send an email when the service fails, restart WildFly nightly to cure memory leaks, and much more.