Documentation versions (currently viewingVaadin 24)

Hot Deploy & Live Reload

How to enable hotswap when developing Vaadin applications using CDI.

This page demonstrates how to enable hotswap when developing Vaadin applications using CDI (Context and Dependency Injection,the standard dependency injection framework for Java EE).

Apache TomEE

You should use Apache TomEE with the tomee-maven-plugin, and start the server by running the goal tomee:run. Configure the plugin as follows in the <plugins> section of pom.xml:


    <!-- more plugins -->

The configuration enables auto-reload and ensures that any change to a file with the extension .class (a Java recompile) triggers the TomEE server reload. You still need to refresh the browser page. If you base your project on the Vaadin CDI starter (from, the above configuration is already done for you.

During the hotswap cycle, the session is serialized before the server is stopped and deserialized after it’s restarted. This means that the user log-in and other session-based data are still available.

Known Issues

  • During hotswap, the TomEE log may contain warnings about memory leaks due to the webpack server and watchdog process not being terminated. These can safely be ignored.

  • If a class with a @Route annotation is removed, the route given in the annotation is still navigable after reload. This isn’t a problem when only modifying the route of a view, without deleting the Java class.

Other Servlet Containers

Other popular CDI-enabled servlet containers include WildFly, JBoss Enterprise Application Platform (EAP), GlassFish, IBM WebSphere and Oracle WebLogic. Some of these come with IDE integrations that enable hot reloading of application code. If you develop a Vaadin application against one of these application servers, consult the provider for available developer tooling.