-
Notifications
You must be signed in to change notification settings - Fork 176
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
OSGi support for Flow 2.x in npm mode #9187
Conversation
flow-server/src/main/java/com/vaadin/flow/server/DeploymentConfigurationFactory.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/DeploymentConfigurationFactory.java
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the compatibility mode override be dropped as we are adding stats and token support?
flow-server/src/main/java/com/vaadin/flow/server/DeploymentConfigurationFactory.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/DeploymentConfigurationFactory.java
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java
Show resolved
Hide resolved
Boolean.toString(false)); | ||
initParameters.setProperty(SERVLET_PARAMETER_ENABLE_DEV_SERVER, | ||
Boolean.toString(false)); | ||
initParameters.setProperty(EXTERNAL_STATS_FILE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flow-server/src/main/java/com/vaadin/flow/server/DeploymentConfigurationFactory.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question.
Also it seems that having osgi-related code in FrontendUtils
and DeploymentConfigurationFactory
(very little in latter) is a bit of a code smell. No need to do anything for now, but I think overall it would be great if we structure the OSGi code somehow as something that is just plugged in as an "alternative implementation" when OSGi is used, instead that it is spread all over the code to handle certain things in an OSGi way. It is just something to think about
flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java
Outdated
Show resolved
Hide resolved
I totally agree. |
4a2bc7b
to
b99fccc
Compare
...-server/src/main/java/com/vaadin/flow/server/startup/DeferredServletContextInitializers.java
Show resolved
Hide resolved
...-server/src/main/java/com/vaadin/flow/server/startup/DeferredServletContextInitializers.java
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/osgi/VaadinBundleTracker.java
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/osgi/VaadinBundleTracker.java
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/osgi/VaadinBundleTracker.java
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/startup/LookupInitializer.java
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/startup/ApplicationRouteRegistry.java
Show resolved
Hide resolved
...rc/main/java/com/vaadin/flow/server/startup/ClassLoaderAwareServletContainerInitializer.java
Show resolved
Hide resolved
...rc/main/java/com/vaadin/flow/server/startup/ClassLoaderAwareServletContainerInitializer.java
Show resolved
Hide resolved
...rc/main/java/com/vaadin/flow/server/startup/ClassLoaderAwareServletContainerInitializer.java
Show resolved
Hide resolved
...rc/main/java/com/vaadin/flow/server/startup/ClassLoaderAwareServletContainerInitializer.java
Show resolved
Hide resolved
...rc/main/java/com/vaadin/flow/server/startup/ClassLoaderAwareServletContainerInitializer.java
Show resolved
Hide resolved
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/OSGiInstantiatorFactory.java
Show resolved
Hide resolved
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/OSGiInstantiatorFactory.java
Show resolved
Hide resolved
...ver/src/test/java/com/vaadin/flow/server/communication/WebComponentBootstrapHandlerTest.java
Show resolved
Hide resolved
Fix OSGi related unit test one more time Fix OSGi related unit test one more time
Minor code corrections, javadocs Correct unit test Correct code
Add unit test for transferring attributes to the servlet context. chore: Add unit test for loading instantiators test: add unit test for getting token file test: add unit tests for FrontendUtils test: add unit test for deferred context initializer execution test: add test for delegating to lookup test: add tests for LookupInitializer test: add test resource test: correct resources location and set bower mode if no token file test: correct resource location
OSGi ResourceProvider impl should be available as a service at the moment when Vaadin WAB register a servlet. It's not possible without extra unclear config to make sure that the service is registered if it's in the flow-osgi : the bundle may be activated at any moment regardless of servlet registration. The issue doesn't appear if the service is registered at the flow-bundle start phase.
88a13ca
to
12bd846
Compare
flow-server/src/main/java/com/vaadin/flow/server/VaadinServletContext.java
Show resolved
Hide resolved
...rc/main/java/com/vaadin/flow/server/startup/ClassLoaderAwareServletContainerInitializer.java
Show resolved
Hide resolved
...rc/main/java/com/vaadin/flow/server/startup/ClassLoaderAwareServletContainerInitializer.java
Show resolved
Hide resolved
...-server/src/main/java/com/vaadin/flow/server/startup/DeferredServletContextInitializers.java
Show resolved
Hide resolved
...-server/src/main/java/com/vaadin/flow/server/startup/DeferredServletContextInitializers.java
Show resolved
Hide resolved
Fixes for the current review round : #9289 |
* refactoring: review fixes * chore: add a comment about Jar packaging in test-root-context module * fix: ensureServletContext should be always called * fix: fix review comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed up till 12th commit. (not approving since we don't know if this will land to 2.5 or not)
} | ||
|
||
private void registerClientResources(Bundle clientBundle) { | ||
Hashtable<String, Object> properties = new Hashtable<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also waiting for fix as we are using OSGi bridged servlet. |
This is already done in the |
I'm doing migration from V8 to V14 and hoped that updating flow to 2.5 will fix the issue. |
avoid failures on every Chrome version update
SonarQube analysis reported 43 issues Watch the comments in this conversation to review them. Top 10 extra issuesNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
Closing for now as OSGi support will likely not be backported to v14 at all, or not like it was done here anyway as this is slightly different from how it works since v19. |
Fixes #9146