Reported in awareness of the fact that neither CDI v1.2 (maintenance JSR-346) nor CDI v2.0 JSR 365 (http://docs.jboss.org/cdi/spec/2.0/cdi-spec.html#builtin_scopes) explicitly mention @ViewScoped as a built-in CDI scope. In this sense, the report may therefore be considered a wish for future support. _ When an explicitly @Dependent pseudo-scoped @Stateful session bean (or an implicitly @Dependent pseudo-scoped session bean, using default scope) is injected using CDI @Inject into a CDI-compatible @ViewScoped JSF backing bean (javax.faces.view.ViewScoped), on @PreDestroy of the backing bean the injected @Dependent @Stateful session bean does not have its @PreDestroy invoked, and it can't be garbage collected (confirmed using NetBeans Profiler). The same issue also happens with the OmniFaces (org.omnifaces.cdi.ViewScoped). |