-
Download and install Service Protector.
-
Start Service Protector.
-
Select Protector > Add to open the Add Protector window:
-
On the General tab, in the Service to protect field, choose your GlassFish Windows Service.
The service will probably be named something like domain1 GlassFish Server — the default when installing GlassFish as a Windows Service:
-
If you find that GlassFish
gets slower over time
we recommend that you periodically restart the service at a time when no one is likely to be using the server.
To do so, switch over to the Monitor tab and:
Check the At the following times box.
Click the Add button.
Specify the day and time to restart the service. We went with every day at 3 AM. Note that you can choose to reboot the server at that time if you like.
Click the OK button to record the time.
-
We're done setting up the basics so click the Save button. In a few seconds, an entry for GlassFish will show up in the Service Protector window.
The green shield means that Service Protector is already monitoring GlassFish:
-
That's it. Next time your computer boots, GlassFish will start automatically and Service Protector will start watching the service to quickly restart it if it stops for any reason.
We encourage you to edit the GlassFish entry in Service Protector and check out the many other settings that may be beneficial to your environment.
For example, send an email when the service fails, configure a
health check to monitor the web interface and bounce the service when it fails, and much more.