Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

CDI UI Scope never cleaned up although UI detached?

Jürgen Dallner
6 years ago Mar 17, 2017 10:33am
Jürgen Dallner
5 years ago Mar 31, 2017 8:45am
Michael Steinacher
5 years ago Apr 19, 2017 8:50am
Jürgen Dallner
5 years ago Jun 06, 2017 12:04pm

Michael, thanks for your help. That was interesting, but my issue was a little different since the CDI UI and the last active CDI View were never cleaned up, even after session expiry.

The cause was a very simple mistake. But since others might also stumble into it, I want to share it:

At some point in the project, somebody introduced a custom servlet in order to add a BootstrapListener and configured it in the web.xml.
Unfortunately, this custom servlet was not derived from VaadinCDIServlet (which is used by default with CDI), but from VaadinServlet which - of course - does not care about cleaning up contextual resources...

A litle warning during startup would however have been very helpful (at least I haven't seen one)...

Tatu Lund
5 years ago Jun 07, 2017 5:55am
Robson Viana
4 years ago Apr 25, 2018 12:58pm
Jürgen Dallner
4 years ago Apr 25, 2018 3:57pm
Tatu Lund
4 years ago Apr 26, 2018 4:33am