Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-tck-dev] compatibility alert: Do (Platform TCK) tests that use Faces need CDI to be enabled (perhaps via empty beans.xml)?

Sorry, I just renamed the subject since this isn't really about managed beans...

I will start working on a possible change to the Platform TCK to add empty beans.xml to various Faces tests (there are many), however, I would like confirmation that the Faces 4.0 SPEC team agrees that all (Faces 4.0) application deployment requires CDI to be enabled which is a breaking change and probably should be added to the Faces 4.0 SPEC document.  I think this is important so implementations know if they need to address "CDI is not available" failures or if Faces applications should work around that.

Currently, if I build the spec doc, I  see:
Changes between 4.0 and 3.0
Backward Compatibility with Previous Versions

Thanks for the clarification!


On 4/29/22 5:23 AM, Scott Marlow wrote:
I was just looking at which mentions:

We also intend to continue modernizing by moving more things to CDI.
Continue re-basing on CDI:

CDI events
Internal artefacts as CDI beans
Additional artefacts injectable

But the above description doesn't mention that Faces 4.0 is no longer compatible with applications that previously worked but do not with Faces 4.0 since CDI is not active by default in EE 10.  The well known workaround is to add a beans.xml which is what we did in the new Faces tck, which I now see is the same change we need to make in the Platform TCK.

So on the surface it may seem that CDI 4.0 broke the existing Platform TCK tests but it might really be that Faces 4.0 changed it's requirements to no longer work with Faces applications that are configured with CDI discovery mode == none.

Is my observation correct about Faces 4.0 breaking compatibility with applications that do not have CDI enabled?  If yes, I will start updating the tests to include needed beans.xml and update the new morraja issue that I opened.


On Thu, Apr 28, 2022, 12:06 PM Scott Marlow <smarlow@xxxxxxxxxx> wrote:


GlassFish issue 23917 [1] asks "Since managed beans are removed now via jakartaee/faces#1547, should Faces 4.0 implementations fail to deploy applications with faces-config.xml that specify managed beans?"  We are looking to make a Platform TCK test change to adjust for the "CDI is not available" failure mentioned in [1] but I am wondering if the test adjustment should be to:

  1. Add empty beans.xml so CDI is available as suggested in [3].
  2. Remove the Platform TCK tests that use Managed Beans, since Managed Beans are no longer supported in Faces 4.0.



Back to the top