Keep Eclipse GlassFish Windows Service running 24/7

How to Keep the GlassFish Windows Service Running 24/7 with Service Protector

Automatically restart Eclipse GlassFish whenever it crashes or stops for any reason. Periodically refresh it at a safe time to cure memory leaks


Last Updated on November 3, 2026

GlassFish is an open-source Java application server supported by the Eclipse Foundation. It can be installed as a Windows Service, to run unattended in the background in a 24x7 server environment:


To protect the GlassFish Windows Service with Service Protector:

  1. Download and install Service Protector.

  2. Start Service Protector.

  3. Select Protector > Add to open the Add Protector window:

    Add Protector

  4. 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:

    Choose the GlassFish Windows Service

  5. 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:

    1. Check the At the following times box.

    2. Click the Add button.

    3. 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.

    4. Click the OK button to record the time.

    Restart the GlassFish Windows Service daily

  6. 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:

    GlassFish Windows Service: Protected

  7. 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.


Trouble protecting the GlassFish Windows Service?

  • From Service Protector, select Protector > Report Activity > Today to bring up an HTML report detailing the interaction between Service Protector and GlassFish.

  • Browse the Service Protector FAQ for answers to commonly asked questions and troubleshooting tips.

  • Contact us and we will be happy to help!