Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Fixes #22216: WEBSOCKET - CDI RELATED TESTS FAIL IN CTS (#22210)
Browse files Browse the repository at this point in the history
  • Loading branch information
shingwaichan authored and yaminikb committed Aug 16, 2017
1 parent 48fbdc1 commit 40dfb64
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ public final class ContainerEvent extends EventObject {

public static final String PRE_DESTROY = "predestroy";

public static final String BEFORE_CONTEXT_INITIALIZER_ON_STARTUP
= "beforeContextInitializerOnStartup";

public static final String AFTER_CONTEXT_INITIALIZER_ON_STARTUP
= "afterContextInitializerOnStartup";

public static final String BEFORE_CONTEXT_INITIALIZED
= "beforeContextInitialized";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5708,8 +5708,12 @@ protected void callServletContainerInitializers()
}
ServletContainerInitializer iniInstance =
initializer.newInstance();
fireContainerEvent(ContainerEvent.BEFORE_CONTEXT_INITIALIZER_ON_STARTUP,
iniInstance);
iniInstance.onStartup(
initializerList.get(initializer), ctxt);
fireContainerEvent(ContainerEvent.AFTER_CONTEXT_INITIALIZER_ON_STARTUP,
iniInstance);
} catch (Throwable t) {
String msg = MessageFormat.format(rb.getString(LogFacade.INVOKING_SERVLET_CONTAINER_INIT_EXCEPTION),
initializer.getCanonicalName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public final class WebContainerListener

static {
// preInvoke events
beforeEvents.add(ContainerEvent.BEFORE_CONTEXT_INITIALIZER_ON_STARTUP);
beforeEvents.add(ContainerEvent.BEFORE_CONTEXT_INITIALIZED);
beforeEvents.add(ContainerEvent.BEFORE_CONTEXT_DESTROYED);
beforeEvents.add(ContainerEvent.BEFORE_CONTEXT_ATTRIBUTE_ADDED);
Expand Down Expand Up @@ -105,6 +106,7 @@ public final class WebContainerListener
beforeEvents.add(ContainerEvent.BEFORE_LOGOUT);

// postInvoke events
afterEvents.add(ContainerEvent.AFTER_CONTEXT_INITIALIZER_ON_STARTUP);
afterEvents.add(ContainerEvent.AFTER_CONTEXT_INITIALIZED);
afterEvents.add(ContainerEvent.AFTER_CONTEXT_DESTROYED);
afterEvents.add(ContainerEvent.AFTER_CONTEXT_ATTRIBUTE_ADDED);
Expand Down

0 comments on commit 40dfb64

Please sign in to comment.