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

MYFACES-4660 5.0 view destroying fix + keeping track of user connection in multiple tabs #707

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

milansie
Copy link
Contributor

1/ when the view is destroyed (i.e. the user reaches the NUMBER_OF_VIEWS_IN_SESSION limit), sessionScope channels are not destroyed. Channel could still be active for other views or newly created ones. In other words, session-scoped channels only get destroyed when the entire session is destroyed.

2/ we have to track number of user channelToken usage connections (when the user is using same channelToken in multiple browser windows / tabs with same http session, the channelToken remains same), and we can't close this channel until all user connections to this channel are closed (all tabs/windows).

When was the view scope destroyed, session scope channel tokens was also destroyed (although session was still alive). Destroying of the session scope channelToken is left to the automatic destroying of the SessionScope.
The number of channelToken used by user is tracked (increases when new connection is opened (in the same http session, ie new browser tab), decreased when the connection is closed). The channelToken is kept tracked until all connections are closed.
@milansie milansie changed the title MYFACES-4660 view destroying fix + keeping track of user connection in multiple tabs MYFACES-4660 5.0 view destroying fix + keeping track of user connection in multiple tabs Apr 21, 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
1 participant