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

Issue #3648 - SimpleContainerScope should use WebSocket Behavior for SSL defaults #3651

Closed

Conversation

joakime
Copy link
Contributor

@joakime joakime commented May 14, 2019

Signed-off-by: Joakim Erdfelt [email protected]

{
QueuedThreadPool threadPool = new QueuedThreadPool();
String behavior = "Container";
if (policy != null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this null check here? You would have already gotten a NPE at line 142 above, no?

@@ -166,4 +133,44 @@ public void removeSessionListener(WebSocketSessionListener listener)
{
return sessionListeners;
}

@Override
protected void doStart() throws Exception
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's right to move the initialization code that before was in the constructor to doStart().
For example, WebSocketClient constructor calls HttpClientProvider.get(scope) passing in a scope that is not yet started, which get passed to DefaultHttpClientProvider.newHttpClient(scope) which uses the scope before it's started.
I think we need a better review of the lifecycle of the scope to move things to a different place.

@joakime
Copy link
Contributor Author

joakime commented May 22, 2019

SimpleContainerScope refactored heavily.

  • client specific behaviors moved to ClientContainerScope (no longer a lifecycle)
  • the rest of the SimpleContainerScope has been moved to src/test/java (also no longer a lifecycle)
  • the interface WebSocketContainerScope has been simplified a bit.

@joakime
Copy link
Contributor Author

joakime commented Jun 4, 2019

I am going to submit 3 separate PRs for this.

  1. The simple fix for the limited scope of the issue javax.websocket client container incorrectly creates Server SslContextFactory #3648.
  2. The more comprehensive fix for scopes / containers via issue WebSocketClient constructor cleanup (and deprecations) #3730
  3. Test cases for the 3 different ways CDI can operate via issue Add testing of CDI behaviors #3731

@joakime joakime closed this Jun 4, 2019
@joakime joakime deleted the jetty-9.4.x-3648-websocket-policy-based-ssl branch June 10, 2019 16:52
@joakime joakime restored the jetty-9.4.x-3648-websocket-policy-based-ssl branch June 10, 2019 16:52
@joakime joakime deleted the jetty-9.4.x-3648-websocket-policy-based-ssl branch July 22, 2019 19:25
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