Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: fix inspection and injection of Vaadin scoped beans #152

Merged

Conversation

mcollovati
Copy link
Contributor

Description

Vaadin scoped beans requires VaadinSession and UI thread locals to be set in order to lookup beans.
This change tracks Vaadin scoped beans during serialization and makes sure that required thread locals are set during deserialization.

The serialVersionUID added to TransientDescriptor should keep it compatible with older version, preventing deserialization of previous data to fail.

Fixes #140
Requires vaadin/flow#20394

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

Vaadin scoped beans requires VaadinSession and UI thread locals to be set
in order to lookup beans.
This change tracks Vaadin scoped beans during serialization and makes sure
that required thread locals are set during deserialization.

The serialVersionUID added to TransientDescriptor should keep it compatible
with older version, preventing deserialization of previous data to fail.

Fixes #140
Requires vaadin/flow#20394
@mcollovati
Copy link
Contributor Author

Currently, in draft because it requires the linked flow PR to be merged and back-ported to 24.4 and 24.5, but ready for review.

@mcollovati mcollovati marked this pull request as ready for review November 7, 2024 14:55
@mcollovati
Copy link
Contributor Author

Flow change has been back-ported to 24.5 and 24.4.

@heruan heruan requested a review from tamasmak November 26, 2024 08:52
@tamasmak tamasmak merged commit b404a35 into main Nov 27, 2024
2 checks passed
@tamasmak tamasmak deleted the issues/140-vaadin-scoped-bean-injection-deserialization branch November 27, 2024 14:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants