This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 3f913ff16c1fe4201cf46d3a2b5cba61a539670f
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Sep 10 10:40:10 2024 +0100

    Replace diagram 4 - Container start process
---
 webapps/docs/architecture/startup.xml              |  13 ++-
 .../startup/4_catalina_start_2.plantuml            | 103 +++++++++++++++++++++
 .../architecture/startup/4_catalina_start_2.png    | Bin 0 -> 145242 bytes
 3 files changed, 114 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/architecture/startup.xml 
b/webapps/docs/architecture/startup.xml
index 10d423ec3b..25b8cbcf5b 100644
--- a/webapps/docs/architecture/startup.xml
+++ b/webapps/docs/architecture/startup.xml
@@ -83,14 +83,23 @@ associated with a single Protocol instance and a single 
CoyoteAdapter instance.
 <a href="startup/3_catalina_start_1.png">Diagram 3</a> shows how Tomcat starts
 the objects created by the Digester that were initialized in the previous step.
 This diagram also shows when lifecycle events are fired. There is more detail 
to
-the starting of the Engine which is shown inthe following diagram.
+the starting of the Engine (and other Containers) which is shown in the
+following diagram.
 </p>
 <p>
-Diagram 4 will show how the Host initialises the Context(s).
+<a href="startup/4_catalina_start_2.png">Diagram 4</a> shows how Containers
+(Engines, Hosts, Contexts and Wrappers) start along with any supporting
+Clusters, Realms and Valves.
 </p>
 <p>
 Diagram 5 will show how the Context initialises the Filters, Servlets etc.
 </p>
+<p>
+Diagram 6 will show HostConfig.
+</p>
+<p>
+Diagram 7 will show ContextConfig.
+</p>
 </subsection>
 
 <subsection name="comments">
diff --git a/webapps/docs/architecture/startup/4_catalina_start_2.plantuml 
b/webapps/docs/architecture/startup/4_catalina_start_2.plantuml
new file mode 100644
index 0000000000..0f16fd6cb4
--- /dev/null
+++ b/webapps/docs/architecture/startup/4_catalina_start_2.plantuml
@@ -0,0 +1,103 @@
+@startuml
+
+' Licensed to the Apache Software Foundation (ASF) under one or more
+' contributor license agreements.  See the NOTICE file distributed with
+' this work for additional information regarding copyright ownership.
+' The ASF licenses this file to You under the Apache License, Version 2.0
+' (the "License"); you may not use this file except in compliance with
+' the License.  You may obtain a copy of the License at
+'
+'     http://www.apache.org/licenses/LICENSE-2.0
+'
+' Unless required by applicable law or agreed to in writing, software
+' distributed under the License is distributed on an "AS IS" BASIS,
+' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+' See the License for the specific language governing permissions and
+' limitations under the License.
+
+hide footbox
+skinparam style strictuml
+
+activate Container
+
+Container -> Container: fireLifecycleEvent(\n    BEFORE_START_EVENT)
+
+Container -> Container ++: startInternal()
+
+Container -> Cluster ++: start()
+Cluster -> Cluster: fireLifecycleEvent(\n    BEFORE_START_EVENT)
+Cluster -> Cluster ++: startInternal()
+Cluster -> Cluster: fireLifecycleEvent(\n    START_EVENT)
+return
+|||
+Cluster -> Cluster: fireLifecycleEvent(\n    AFTER_START_EVENT)
+return
+
+Container -> Realm ++: start()
+Realm -> Realm: fireLifecycleEvent(\n    BEFORE_START_EVENT)
+Realm -> Realm ++: startInternal()
+Realm -> Realm: fireLifecycleEvent(\n    START_EVENT)
+return
+|||
+Realm -> Realm: fireLifecycleEvent(\n    AFTER_START_EVENT)
+return
+
+group Children started in parallel if startStopThreads > 1 (Engines and Hosts 
only)
+Container -> Child ++: start()
+note right of Child
+Engines have Hosts as children.
+Hosts have Contexts as children.
+Contexts have Wrappers as children.
+
+Children are containers so the
+process on this diagram is
+repeated for each child.
+
+Contexts do a lot more in start()
+as shown in diagram 5.
+end note
+return
+end group
+
+Container -> Pipeline ++: start()
+Pipeline -> Pipeline: fireLifecycleEvent(\n    BEFORE_START_EVENT)
+Pipeline -> Pipeline ++: startInternal()
+
+group Each Valve is started sequentially
+Pipeline -> Valve ++: start()
+Valve -> Valve: fireLifecycleEvent(\n    BEFORE_START_EVENT)
+Valve -> Valve ++: startInternal()
+Valve -> Valve: fireLifecycleEvent(\n    START_EVENT)
+return
+|||
+Valve -> Valve: fireLifecycleEvent(\n    AFTER_START_EVENT)
+return
+end group
+
+Pipeline -> Pipeline: fireLifecycleEvent(\n    START_EVENT)
+return
+|||
+Pipeline -> Pipeline: fireLifecycleEvent(\n    AFTER_START_EVENT)
+return
+
+Container -> Container: fireLifecycleEvent(\n    START_EVENT)
+
+group If backgroundProcessorDelay > 0 (Engine defaults to 10, other Containers 
-1) 
+Container -> UtilityExecutor ++: scheduleWithFixedDelay()
+UtilityExecutor -> ContainerBackgroundProcessor **
+note right of ContainerBackgroundProcessor
+Re-created
+automatically
+if it fails
+end note
+return
+end group
+
+|||
+Container -> Container: fireLifecycleEvent(\n    AFTER_START_EVENT)
+
+return
+
+|||
+
+@enduml
\ No newline at end of file
diff --git a/webapps/docs/architecture/startup/4_catalina_start_2.png 
b/webapps/docs/architecture/startup/4_catalina_start_2.png
new file mode 100644
index 0000000000..71af65b961
Binary files /dev/null and 
b/webapps/docs/architecture/startup/4_catalina_start_2.png differ


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to