vaadin / quarkus

An extension to Quarkus to support Vaadin Flow
Apache License 2.0
28 stars 3 forks source link

Implement pseudo custom CDI scopes for Quarkus #26

Closed denis-anisimov closed 3 years ago

denis-anisimov commented 3 years ago

Follow up #13.

Should be done after https://github.com/vaadin/quarkus/issues/27 and https://github.com/vaadin/quarkus/issues/24

Quarkus version which we use at the moment doesn't support pseudo-scopes. See quarkusio/quarkus#19725.

The ticket is already fixed but the Quarkus version which we use doesn't contain it. Once the Quarkus version with the fix is released pseudo-scopes should be added: UISxoped. and RouteScoped.

The implementation is quite simple but they need:

There is a bug https://github.com/vaadin/quarkus/issues/24 which blocks checks for RouteScope because HasErrorParameter can be used with RouteScoped (implementation-wise) but HasErrorParameter is not created using CDI injection mechanisms so it's not possible to inject anything there and RouteScoped ITs for HasErrorParameter needs to be copied from CDI to Quarkus (even though in fact it's possible to avoid injection and use static way to get beans)

denis-anisimov commented 3 years ago

Don't miss this IT: https://github.com/vaadin/cdi/blob/master/vaadin-cdi-itest/src/test/java/com/vaadin/cdi/itest/RemoveOldContentTest.java