Vaadin CDI inside EAR deployment

I finally have figured this out:

The problem is when having the vaadin-cdi.jar inside the EAR/lib, its containing ServletContextListener (com.vaadin.cdi.internal.ContextDeployer) is not executed automatically.

The solution is very simple: Just create a web.xml inside the WAR/WEB-INF folder and add an entry: <listener> <listener-class>com.vaadin.cdi.internal.ContextDeployer</listener-class> </listener>
This will make sure, that the @CDIUI annotated class will properly be initialized.