throw ISE if WebSocketSCI.configure() is called on started ServletContextHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
5e60837822
commit
dc74bcf4cc
|
@ -99,6 +99,9 @@ public class JavaxWebSocketServletContainerInitializer implements ServletContain
|
|||
*/
|
||||
public static void configure(ServletContextHandler context, Configurator configurator)
|
||||
{
|
||||
if (context.isStarted())
|
||||
throw new IllegalStateException("configure should be called before starting");
|
||||
|
||||
// In this embedded-jetty usage, allow ServletContext.addListener() to
|
||||
// add other ServletContextListeners (such as the ContextDestroyListener) after
|
||||
// the initialization phase is over. (important for this SCI to function)
|
||||
|
|
|
@ -53,6 +53,9 @@ public class JettyWebSocketServletContainerInitializer implements ServletContain
|
|||
*/
|
||||
public static void configure(ServletContextHandler context, Configurator configurator)
|
||||
{
|
||||
if (context.isStarted())
|
||||
throw new IllegalStateException("configure should be called before starting");
|
||||
|
||||
context.addEventListener(
|
||||
ContainerInitializer
|
||||
.asContextListener(new JettyWebSocketServletContainerInitializer())
|
||||
|
|
Loading…
Reference in New Issue