Skip to content

Conversation

@lachlan-roberts
Copy link
Contributor

This is an attempt to "embrace the pattern" following comment posted by @gregw in #13550

Jetty's component mechanism can handle this. If the components are managed by the server, then it will be started by server and the auto beans in the containers will be unmanaged.

Embrace the pattern!

  • the websocket objects such as WebSocketComponents the WebSocketServerContainer, WebSocketMappings etc are no longer removed as beans from the server is stopped.
  • the WebSocketComponents are now added as beans by the WebSocketServerContainers instead of only on the context handler.

I could not get rid of this logic from WebSocketServerComponents.ensure without breaking tests

if (server.contains(inflaterPool))
    components.unmanage(inflaterPool);
if (server.contains(deflaterPool))
    components.unmanage(deflaterPool);
if (server.contains(bufferPool))
    components.unmanage(bufferPool);
if (executor != null)
    components.unmanage(executor);

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.

2 participants