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

Vaadin-OSGi-Extender header issues #38

Open
denis-anisimov opened this issue Feb 8, 2021 · 0 comments
Open

Vaadin-OSGi-Extender header issues #38

denis-anisimov opened this issue Feb 8, 2021 · 0 comments

Comments

@denis-anisimov
Copy link

denis-anisimov commented Feb 8, 2021

At the moment Vaadin-OSGi-Extender: true header manifest is needed to be able to use navigation targets declared via @Route annotation.

Several issues with that:

  • web app bundle should not require any additional header to be able to use navigation targets declared via @Route inside the bundle. There is already code which identifies the web bundle which register the servlet. It should be possible to use this bundle to initiate scanning classes inside the bundle even without Vaadin-OSGi-Extender. One important notice here: bundles with Vaadin-OSGi-Extender header are collected altogether and all classes inside these bundles are registered as navigation targets. We need logic which populates classes per bundle/servlet context (via the Route application registry which is per application/bundle/context).
  • If bundle is marked as Vaadin-OSGi-Extender then its navigation targets will be published for every Vaadin web application. In most cases this is not what user wants. There should be a way to say that navigation targets inside this bundle are aiming for the specific bundle. OSGi already provides a mechanism which allows associate the bundle with the specific bundle: fragment bundle. So the suggestion is : bundle tracker which scans the bundles for the navigation targets should be aware of fragment bundles and automatically scans fragment bundles of the web app bundle for navigation targets without requiring Vaadin-OSGi-Extender manifest header.
  • If bundle has Vaadin-OSGi-Extender header manifest then all its navigation targets are registered in ANY application route registry. This is may be something which user wants or may be not. Such bundle being deployed modifies any Vaadin web application. It might be that this is not acceptable. There can be also another issue with that: the bundle has Vaadin-OSGi-Extender header but it depends on the web application bundle : e.g. it uses a class which is declared ONLY in this web app bundle. It means that it might be not possible to use navigation targets from this bundle at all in any other web app. As a result the globally populated route will be broken in other web app. To be able to solve the issue described here we should:
    • Allow to use some manifest header which being used in the web app bundle disallows to use any navigation target from any bundle except itself and its fragment bundles.
    • Somehow detect whether there are dependencies to the deployed web app bundles in the Vaadin-OSGi-Extender bundle. If there are such dependencies then the routes may be registered only for the dependencies and not registered for any other bundle. If bundle has no any web app bundle dependencies then its routes are eligible to register for any web app (unless they have a header which disallows any external route registration).
@pleku pleku added the OSGi label Feb 15, 2021
@caalador caalador added this to Done - pending release in OLD Vaadin Flow ongoing work (Vaadin 10+) Feb 18, 2021
@caalador caalador moved this from Done - pending release to Product backlog in OLD Vaadin Flow ongoing work (Vaadin 10+) Feb 18, 2021
@caalador caalador removed this from Product backlog in OLD Vaadin Flow ongoing work (Vaadin 10+) Feb 18, 2021
@mshabarov mshabarov added this to Needs triage in OLD Vaadin Flow bugs & maintenance (Vaadin 10+) via automation Aug 30, 2023
@mshabarov mshabarov moved this from Needs triage to Internal Backlog / Technical Debt in OLD Vaadin Flow bugs & maintenance (Vaadin 10+) Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
OLD Vaadin Flow bugs & maintenance (V...
Internal Backlog / Technical Debt
Status: 🔖 Normal Priority (P2)
Development

No branches or pull requests

2 participants