Server loss detection

Hi,

i was looking for a way to show a notification, when the server connection is lost. This might be the case when the server reboots or the power gets cut off, or the server has an error or whatever.

Unfortunately right now the webpage shows the current page when the server connection is lost. You can still click all the buttons and so on but nothing happens. So the user does not know what is going on until he hits refresh, then it shows page not available.

When the server is back i get the message session expired …In the meantime the webpage is still trying to connect and knows, that the server is not available. I even “hacked” the push javascript to show a notification when the server is not available [Javascript: alert(“Connection lost”);]
. This works, every time a request to the server fails i get that message. Which is around every 5 seconds when the server is unavailable.

In the book of vaadin i found something about error messages:
https://vaadin.com/book/-/page/application.errors.html#application.errors.systemmessages

There it says:


communicationError:
An unspecified communication problem between the Vaadin Client-Side Engine and the application server. The server may be unavailable or there is some other problem.

I tried this as well, but unfortunately this only works, when the webpage has a connection to the server - which is pretty funny because i dont have a connection to the server when the server is unavailable. This message only pops up when the server is back and the webpage war not fully started yet, so a few seconds before the session expired message.

Is there another easy way where i do not have to “hack” the push javascript to show that the webpage has currently no connection to the server?

Thanks in advance!

Samuel

Nobody?

I would like to know how to solve this too…

The problem seems to be known already:
https://vaadin.com/forum#!/thread/5210529