Closed arjantijms closed 1 year ago
@tandraschko Is this already implemented in Mojarra? I can't find associated PR.
AFAIR it just wasnt mentioned in the specs
Yes this is what the issue was about. The spec should require firing the events. This change of the spec is not yet implemented in Mojarra side thus. Is it in MyFaces side?
we dont have specs/javadocs for this part but the code side is implemented
Now also in Mojarra.
Has @BeforeDestroyed
been tested? I'm not seeing the method with this annotation invoked in either Mojarra or MyFaces 4.1 M1/RC1 Releases.
TCK only looks at @Initialized
and @Destroyed
(which work fine)
https://github.com/jakartaee/faces/blob/694b38430ddd9ee9ce6e8670c026739c1b3c0721/tck/faces22/cdiInitDestroyEvent/src/main/java/ee/jakarta/tck/faces/test/javaee7/cdiinitdestroyevent/cdiinitdestroyevent/FlowLogger.java
Ah, our Faces impl code doesn't fire the @BeforeDestroyed
event.
The events are currently weakly encouraged via the CDI specification, with the likely intend to be required by any specifications implementing those. As such Faces should probably require them.
See https://github.com/jakartaee/faces/issues/1731