Reload Application when Server restarts

I’m using the Refresher add-on to update Information, a clock and i’m also executing sql. Now that currently works pretty well for the most part. My problem is that the Tomcat Server the Application is running on sometimes gets restarted. My goal now is to automatically reload/refresh the page when the Server is back up.

What i already tried was:

  1. Disabling the Session expired message so that it will automatically load the logout url which worked when i start the server throught eclipse but fails on the “real” server
  2. Check in the Refresh function if the time is still right and if not closing the Application or loading the url through Window().open(). Fails because the function doesn’t get executed properly if the server is down.

In the current state when i restart the server once the Application catches up but if i do it a second time the App will is loading forever without reloading the page (Loading Indicator doesn’t go away and refresh function doesn’t get called).

Can someone please help me?

Cheers,
M.R.

I think i managed to solve this problem myself. What i have done:

  • Disabled the Session expired message so that it will load the logout url
  • Set the Logout URL to the same page but with ?restartApplication
  • In my uri fragment listener I load the page without ?restartApplication.