Issue #207 - ensuring WebSocketServerFactory init occurs earlier

This commit is contained in:
Joakim Erdfelt 2016-10-13 14:41:53 -07:00
parent 61dc476342
commit 52a8101cd2
1 changed files with 3 additions and 2 deletions

View File

@ -98,6 +98,7 @@ public class WebSocketServerContainerInitializer implements ServletContainerInit
{
// Create Filter
WebSocketUpgradeFilter filter = WebSocketUpgradeFilter.configureContext(context);
filter.getFactory().init(context);
// Create the Jetty ServerContainer implementation
ServerContainer jettyContainer = new ServerContainer(filter,filter.getFactory(),context.getServer().getThreadPool());
@ -123,6 +124,7 @@ public class WebSocketServerContainerInitializer implements ServletContainerInit
{
// Create Filter
WebSocketUpgradeFilter filter = WebSocketUpgradeFilter.configureContext(context);
filter.getFactory().init(context);
// Create the Jetty ServerContainer implementation
ServerContainer jettyContainer = new ServerContainer(filter,filter.getFactory(),jettyContext.getServer().getThreadPool());
@ -247,8 +249,7 @@ public class WebSocketServerContainerInitializer implements ServletContainerInit
{
// Create the Jetty ServerContainer implementation
ServerContainer jettyContainer = configureContext(context,jettyContext);
context.addListener(new ContextDestroyListener()); //make sure context is cleaned up when the context stops
context.addListener(new ContextDestroyListener()); // make sure context is cleaned up when the context stops
// // Establish the DecoratedObjectFactory thread local
// // for various ServiceLoader initiated components to use.