mcollovati/vertx-vaadin

Refactor ServletContainerInitializers loading

mcollovati opened this issue · 1 comments

At the moment only known vaadin ServletContainerInitializer are activated by VaadinVerticle and input class set are loaded duplicating the rules already existing on initializer @HandlesTypes annotation. This leads to potential errors when @HandlesTypes change on vaadin classes.

A better way may loading all ServletContainerInitializer instances using ServiceLoader and load input classes by inspecting @HandlesTypes annotation.

Using ServiceLoader is not feasible bexause some Servlet related initializer must not be loaded.
However reading classes from @HandlesTypes annotation is much better than hardcode values in VaadinVerticle