delegating to the DefaultInstantiator, that uses ServiceLoader
registering a listener that fires a CDI ServiceInitEvent event, to engage all observer methods
However, beans implementing VaadinServiceInitListener are not considered.
Currently, this could be an issue in @QuarkusTest, if you, for example, want to use a custom QuarkusTestProfile to define a bean that does some initialization stuff, but for a couple of tests.
If you define a class with an @Observes method, it will be invoked for all tests.
There are workaround (e.g. use @IfBuildProfile annotation on the observer class, or define the method as @Observes(notifyObserver = Reception.IF_EXISTS) and inject the bean into the test class to force the creation), but it would be easier if QuarkusInstantiator also collects all beans implementing VaadinServiceInitListener so that a developer could simply define the bean in the test profile.
Probably should only load VaadinServiceInitListener beans having the @VaadinServiceEnabled qualifier
QuarkusInstantiator
collectsVaadinServiceInitListener
by:DefaultInstantiator
, that usesServiceLoader
ServiceInitEvent
event, to engage all observer methodsHowever, beans implementing
VaadinServiceInitListener
are not considered. Currently, this could be an issue in@QuarkusTest
, if you, for example, want to use a customQuarkusTestProfile
to define a bean that does some initialization stuff, but for a couple of tests. If you define a class with an@Observes
method, it will be invoked for all tests.There are workaround (e.g. use
@IfBuildProfile
annotation on the observer class, or define the method as@Observes(notifyObserver = Reception.IF_EXISTS)
and inject the bean into the test class to force the creation), but it would be easier ifQuarkusInstantiator
also collects all beans implementingVaadinServiceInitListener
so that a developer could simply define the bean in the test profile.Probably should only load
VaadinServiceInitListener
beans having the@VaadinServiceEnabled
qualifier