Reputation: 46
We are developing a Java web-application with Vaadin7 to be run on a cluster of machine instances with Tomcat7 behind a load-balancer. In order to update hosting environments and application, we would like to take down instances in regular intervals. We use a custom host management solution to manage our machine instances.
How can we ensure that the application shuts down gracefully, and for instance does not break HTTP sessions? Does Vaadin provide support for a graceful shutdown?
Upvotes: 1
Views: 65
Reputation: 12305
Not breaking sessions means they have to be serialized. This is possible with Vaadin, although for your own components you'll have to take care of this yourself/ As can be in the Book of Vaadin section Application Lifecycle:
Serialization requires that the applications are serializable, that is, all classes implement the Serializable interface. All Vaadin classes do. If you extend them or implement interfaces, you can provide an optional serialization key, which is automatically generated by Eclipse if you use it. Serialization is also used for clustering and cloud computing, such as with Google App Engine, as described in Section 11.7, “Google App Engine Integration”.
As long as the load balanacer can direct the client to an instance, it should not cause Out of Sync errors which you get if the client can't connect to the server.
Upvotes: 1