Skip to content

Conversation

@cstamas
Copy link
Member

@cstamas cstamas commented Oct 26, 2022

Maven ITs running against apache/maven#831 fails. Reason is "too late" registration of onClose handler to session, when it is already readOnoy.

There are valid cases in Maven when interaction with resolver (that would "lazily" init SyncContext) happens way late, when session is already made readOnly.

Fix: adding onCloseHandler should NOT be affected by readOnly state of session, as it merely means it's members like LRM, etc are "fixed", but session data etc are all still mutable.

Similarly, due lazy init, some components may -- as in above valid cases -- register some handler when session is already read only.

This change makes all Maven ITs pass with this resolver.

There are valid cases in Maven when interaction with
resolver (that would "lazily" init SyncContext) happens
way late, when session is already done readOnly.

Fix: adding onCloseHandler should NOT be affected by
readOnly state of session, as it merely means it's members
like LRM, etc are "fixed", but session data etc are all
still mutable.

Similarly, due lazy init, some components may way -- as above
in valid cases -- register some handler when session is
already read only.

This change makes all Maven ITs pass with this resolver.
@cstamas cstamas self-assigned this Oct 26, 2022
@cstamas cstamas requested a review from michael-o October 26, 2022 11:03
@cstamas cstamas merged commit 5b6c319 into apache:master Oct 26, 2022
@cstamas cstamas deleted the fix-session-close branch October 26, 2022 12:33
@jira-importer
Copy link

Resolve #954

1 similar comment
@jira-importer
Copy link

Resolve #954

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

Successfully merging this pull request may close these issues.

4 participants