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

Synchronizing on the session object could be ineffectual due to the servlet implentation not providing reference stability #5380

Closed
VsevolodGolovanov opened this issue Dec 16, 2023 · 3 comments
Milestone

Comments

@VsevolodGolovanov
Copy link

Mojarra synchronizes on the session object in some places, but at least Undertow 2.0.15.Final returns a different instance (wrapper) from HttpServletRequest#getSession for every request in the same session.
A simple text search of "synchronized (ses" in mojarra-2.3.21-RELEASE sources yields:

\impl\src\main\java\com\sun\faces\application\view\ViewScopeContextManager.java
\impl\src\main\java\com\sun\faces\renderkit\ServerSideStateHelper.java
\test\servlet30-isolated\cactus\src\main\java\com\sun\faces\application\DeprStateManagerImpl.java

This is issue is a follow up to this.

@mnriem
Copy link
Contributor

mnriem commented Dec 19, 2023

@VsevolodGolovanov Can you create a PR for the suggested changes?

BalusC added a commit that referenced this issue Feb 10, 2024
@BalusC
Copy link
Contributor

BalusC commented Feb 10, 2024

I prepped a PR for 4.0.

Feel free to backport for 2.3.

@pizzi80
Copy link
Contributor

pizzi80 commented Feb 26, 2024

I don't know if someone can help...
AFAYK:

Does this also apply to Tomcat?

Can this create a race condition with ajax requests backed by ViewScoped beans?

I'm experiencing some very strange hanging threads
on POST (ajax) requests on Tomcat
with no visible UI error and no exceptions on the server log.

BalusC added a commit that referenced this issue Mar 2, 2024
BalusC added a commit that referenced this issue Mar 2, 2024
@BalusC BalusC added this to the 4.0.6 milestone Mar 2, 2024
@BalusC BalusC closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants