This repository was archived by the owner on Nov 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
web-core/src/main/java/org/apache/catalina
web-glue/src/main/java/com/sun/web/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ public final class ContainerEvent extends EventObject {
7373
7474 public static final String PRE_DESTROY = "predestroy" ;
7575
76+ public static final String BEFORE_CONTEXT_INITIALIZER_ON_STARTUP
77+ = "beforeContextInitializerOnStartup" ;
78+
79+ public static final String AFTER_CONTEXT_INITIALIZER_ON_STARTUP
80+ = "afterContextInitializerOnStartup" ;
81+
7682 public static final String BEFORE_CONTEXT_INITIALIZED
7783 = "beforeContextInitialized" ;
7884
Original file line number Diff line number Diff line change @@ -5708,8 +5708,12 @@ protected void callServletContainerInitializers()
57085708 }
57095709 ServletContainerInitializer iniInstance =
57105710 initializer .newInstance ();
5711+ fireContainerEvent (ContainerEvent .BEFORE_CONTEXT_INITIALIZER_ON_STARTUP ,
5712+ iniInstance );
57115713 iniInstance .onStartup (
57125714 initializerList .get (initializer ), ctxt );
5715+ fireContainerEvent (ContainerEvent .AFTER_CONTEXT_INITIALIZER_ON_STARTUP ,
5716+ iniInstance );
57135717 } catch (Throwable t ) {
57145718 String msg = MessageFormat .format (rb .getString (LogFacade .INVOKING_SERVLET_CONTAINER_INIT_EXCEPTION ),
57155719 initializer .getCanonicalName ());
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ public final class WebContainerListener
7777
7878 static {
7979 // preInvoke events
80+ beforeEvents .add (ContainerEvent .BEFORE_CONTEXT_INITIALIZER_ON_STARTUP );
8081 beforeEvents .add (ContainerEvent .BEFORE_CONTEXT_INITIALIZED );
8182 beforeEvents .add (ContainerEvent .BEFORE_CONTEXT_DESTROYED );
8283 beforeEvents .add (ContainerEvent .BEFORE_CONTEXT_ATTRIBUTE_ADDED );
@@ -105,6 +106,7 @@ public final class WebContainerListener
105106 beforeEvents .add (ContainerEvent .BEFORE_LOGOUT );
106107
107108 // postInvoke events
109+ afterEvents .add (ContainerEvent .AFTER_CONTEXT_INITIALIZER_ON_STARTUP );
108110 afterEvents .add (ContainerEvent .AFTER_CONTEXT_INITIALIZED );
109111 afterEvents .add (ContainerEvent .AFTER_CONTEXT_DESTROYED );
110112 afterEvents .add (ContainerEvent .AFTER_CONTEXT_ATTRIBUTE_ADDED );
You can’t perform that action at this time.
0 commit comments