-
Notifications
You must be signed in to change notification settings - Fork 65
Websocket updates #1055
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
Websocket updates #1055
Conversation
|
||
ServletContextHandler notesServletContextHandler = | ||
new ServletContextHandler(ServletContextHandler.SESSIONS); | ||
servletContextHandler.setContextPath("/search/catalog/notes"); |
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 this be notesServletContextHandler.setContextPath("/search/catalog/notes");
instead?
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.
Holdover from another attempted solution. Will be deleting
|
||
ServletContextHandler servletContextHandler = | ||
new ServletContextHandler(ServletContextHandler.SESSIONS); | ||
servletContextHandler.setContextPath("/search/catalog/ws"); |
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 wondering if these configurable?
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.
These probably should be constants at a minimum if not configurable
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.
Same as above
<parent> | ||
<artifactId>backend</artifactId> | ||
<groupId>org.codice.ddf.search</groupId> | ||
<version>5.2.17-SNAPSHOT</version> |
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.
✏️ rebase needed - this version will need to be updated to match master
ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/endpoints.xml
Outdated
Show resolved
Hide resolved
ui-backend/catalog-ui-search/src/main/resources/OSGI-INF/blueprint/endpoints.xml
Outdated
Show resolved
Hide resolved
@@ -45,14 +45,6 @@ Services (HTTP/WS) that catalog-ui-search provides for the UI | |||
</service-properties> | |||
</service> | |||
|
|||
<service ref="socketServlet" interface="javax.servlet.Servlet"> |
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.
We no longer register a standard servlet for websockets. The specifications pax web adheres to are for osgi's whiteboard pattern - which is for http. As a result websockets aren't directly supported through whiteboard servlet registration.
<configuration> | ||
<instructions> | ||
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> | ||
<Web-ContextPath>/search/catalog/ws</Web-ContextPath> |
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.
Register as a WAB. Pax web listens for websockets created in WABs (but not the old websocket annotations)
build now |
Internal build has been started, your results will be available at build completion. |
Build SUCCESS See the job results in legacy Jenkins UI or in Blue Ocean UI. |
See codice/ddf#6894
The move to pax web 8.0.24 updated websocket use and registration. Unlike other servlets there is no direct whiteboard registration for websockets. While there are a couple ways to register a websocket between the java servlet specification, jetty, and pax web this approach uses the Java Servlet annotation @WebServlet which works with all three.
Pax web requires a more complicated setup for websockets through other approaches but by using this annotation and registering the Websocket bundles as WABs it correctly configures the Servlet registration/ Websocket upgrade.
SecureWebsocketServlet has been changed to a websocketCreator for use with the new WABs that must be deployed for websocket integration.