Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context param 'jakarta.faces.NUMBER_OF_CLIENT_WINDOWS' ignored. #5291

Closed
jezovuk opened this issue Jul 26, 2023 · 2 comments
Closed

Context param 'jakarta.faces.NUMBER_OF_CLIENT_WINDOWS' ignored. #5291

jezovuk opened this issue Jul 26, 2023 · 2 comments
Labels
Milestone

Comments

@jezovuk
Copy link

jezovuk commented Jul 26, 2023

Describe the bug

It seems that context param jakarta.faces.NUMBER_OF_CLIENT_WINDOWS is ignored and max number of client windows always (silently) defaults to 10.

To Reproduce

Add following in web.xml:

<context-param>
    <param-name>jakarta.faces.NUMBER_OF_CLIENT_WINDOWS</param-name>
    <param-value>3</param-value>
 </context-param>

Expected behavior

Number of client windows is expected to be limited to configured value 3 (for above case). It is expected that least-recently-used windows get 'forgotten' once windows after 3rd are opened.

Instead, window scoped beans get forgotten/dropped only after 10th window is opened.
Debugging confirms that limit config is ignored and hard-coded value 10 is used instead.

Additional context

From cursory glance, it seems that com.sun.faces.config.WebConfiguration.WebContextInitParameter enum is missing the member for jakarta.faces.NUMBER_OF_CLIENT_WINDOWS.

Observed with Mojarra 4.0.2 on Adoptium Temurin JDK 17.0.6 (desktop Firefox 115.0.2 on Windows 10).

@BalusC
Copy link
Contributor

BalusC commented Jul 29, 2023

Confirmed. The impl was not correctly done in 20f8727. It consulted the session map instead of context param.

BalusC added a commit that referenced this issue Jul 29, 2023
jakarta.faces.NUMBER_OF_CLIENT_WINDOWS was not considered as context
param
@mnriem mnriem added the 4.0 label Sep 5, 2023
@BalusC BalusC closed this as completed Sep 9, 2023
@BalusC
Copy link
Contributor

BalusC commented Sep 9, 2023

4.0.4 has been released with the fix.

@BalusC BalusC added this to the 4.0.4 milestone Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants