You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2024/09/10 10:30:07 UTC
(tomcat) branch 9.0.x updated (46bc8c61d0 -> da713f19ee)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
from 46bc8c61d0 Add note that more detail for Hosts etc will be in diagram 4
new 3f913ff16c Replace diagram 4 - Container start process
new 08cfdf1fad Fix message type for creation
new da713f19ee Add diagram showing Context start process
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
webapps/docs/architecture/startup.xml | 16 ++-
.../startup/4_catalina_start_2.plantuml | 103 +++++++++++++++
.../architecture/startup/4_catalina_start_2.png | Bin 0 -> 145252 bytes
.../startup/5_catalina_start_3.plantuml | 140 +++++++++++++++++++++
.../architecture/startup/5_catalina_start_3.png | Bin 0 -> 266057 bytes
5 files changed, 256 insertions(+), 3 deletions(-)
create mode 100644 webapps/docs/architecture/startup/4_catalina_start_2.plantuml
create mode 100644 webapps/docs/architecture/startup/4_catalina_start_2.png
create mode 100644 webapps/docs/architecture/startup/5_catalina_start_3.plantuml
create mode 100644 webapps/docs/architecture/startup/5_catalina_start_3.png
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
(tomcat) 01/03: Replace diagram 4 - Container start process
Posted by ma...@apache.org.
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
(tomcat) 03/03: Add diagram showing Context start process
Posted by ma...@apache.org.
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 da713f19ee03b0247fac33a9e3d45d05eba47461
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Sep 10 11:26:32 2024 +0100
Add diagram showing Context start process
---
webapps/docs/architecture/startup.xml | 3 +-
.../startup/5_catalina_start_3.plantuml | 140 +++++++++++++++++++++
.../architecture/startup/5_catalina_start_3.png | Bin 0 -> 266057 bytes
3 files changed, 142 insertions(+), 1 deletion(-)
diff --git a/webapps/docs/architecture/startup.xml b/webapps/docs/architecture/startup.xml
index 25b8cbcf5b..28fec45bf2 100644
--- a/webapps/docs/architecture/startup.xml
+++ b/webapps/docs/architecture/startup.xml
@@ -92,7 +92,8 @@ following diagram.
Clusters, Realms and Valves.
</p>
<p>
-Diagram 5 will show how the Context initialises the Filters, Servlets etc.
+<a href="startup/5_catalina_start_3.png">Diagram 5</a> shows the start process
+for Context elements as it is rather more involved that the other Containers.
</p>
<p>
Diagram 6 will show HostConfig.
diff --git a/webapps/docs/architecture/startup/5_catalina_start_3.plantuml b/webapps/docs/architecture/startup/5_catalina_start_3.plantuml
new file mode 100644
index 0000000000..7f5bd49dae
--- /dev/null
+++ b/webapps/docs/architecture/startup/5_catalina_start_3.plantuml
@@ -0,0 +1,140 @@
+@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 Host
+
+Host -> Context ++: start()
+
+Context -> Context: fireLifecycleEvent(\n BEFORE_START_EVENT)
+
+Context -> Context ++: startInternal()
+
+Context -> NamingResourcesImpl ++: start()
+NamingResourcesImpl -> NamingResourcesImpl: fireLifecycleEvent(\n BEFORE_START_EVENT)
+NamingResourcesImpl -> NamingResourcesImpl ++: startInternal()
+NamingResourcesImpl -> NamingResourcesImpl: fireLifecycleEvent(\n START_EVENT)
+return
+|||
+NamingResourcesImpl -> NamingResourcesImpl: fireLifecycleEvent(\n AFTER_START_EVENT)
+return
+
+Context -> Context: postWorkDirectory()
+
+Context --> StandardRoot **
+
+Context -> StandardRoot ++: start()
+StandardRoot -> StandardRoot: fireLifecycleEvent(\n BEFORE_START_EVENT)
+StandardRoot -> StandardRoot ++: startInternal()
+StandardRoot -> StandardRoot: fireLifecycleEvent(\n START_EVENT)
+return
+|||
+StandardRoot -> StandardRoot: fireLifecycleEvent(\n AFTER_START_EVENT)
+return
+
+Context --> WebappLoader **
+Context --> CookieProcessor **
+Context --> CharsetMapper **
+
+Context --> WebappLoader ++: start()
+WebappLoader -> WebappLoader: fireLifecycleEvent(\n BEFORE_START_EVENT)
+WebappLoader -> WebappLoader ++: startInternal()
+WebappLoader -> WebappLoader: fireLifecycleEvent(\n START_EVENT)
+return
+|||
+WebappLoader -> WebappLoader: fireLifecycleEvent(\n AFTER_START_EVENT)
+return
+
+Context -> 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
+
+Context -> Context: fireLifecycleEvent(\n CONFIGURE_START_EVENT)
+
+group Each Wrapper is started sequentially
+Context -> Wrapper ++: start()
+Wrapper -> Wrapper: fireLifecycleEvent(\n BEFORE_START_EVENT)
+Wrapper -> Wrapper ++: startInternal()
+Wrapper -> Wrapper: fireLifecycleEvent(\n START_EVENT)
+return
+|||
+Wrapper -> Wrapper: fireLifecycleEvent(\n AFTER_START_EVENT)
+return
+end group
+
+Context -> 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
+
+|||
+Context --> Manager **
+Context -> Cluster ++: registerManager()
+return
+
+group Each SCI is called sequentially
+Context -> SCI ++: onStartUp
+return
+end group
+
+Context -> Context: listenerStart()
+
+Context -> Manager ++: start()
+Manager -> Manager: fireLifecycleEvent(\n BEFORE_START_EVENT)
+Manager -> Manager ++: startInternal()
+Manager -> Manager: fireLifecycleEvent(\n START_EVENT)
+return
+|||
+Manager -> Manager: fireLifecycleEvent(\n AFTER_START_EVENT)
+return
+
+Context -> Context: filterStart()
+
+Context -> Context: loadOnStartup()
+
+Context -> Context: fireLifecycleEvent(\n START_EVENT)
+return
+
+|||
+Context -> Context: fireLifecycleEvent(\n AFTER_START_EVENT)
+
+return
+
+@enduml
\ No newline at end of file
diff --git a/webapps/docs/architecture/startup/5_catalina_start_3.png b/webapps/docs/architecture/startup/5_catalina_start_3.png
new file mode 100644
index 0000000000..e45ca5a74d
Binary files /dev/null and b/webapps/docs/architecture/startup/5_catalina_start_3.png differ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
(tomcat) 02/03: Fix message type for creation
Posted by ma...@apache.org.
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 08cfdf1fad0932111386c07b6c2d62dfa58be79d
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Sep 10 11:24:13 2024 +0100
Fix message type for creation
---
.../startup/4_catalina_start_2.plantuml | 2 +-
.../architecture/startup/4_catalina_start_2.png | Bin 145242 -> 145252 bytes
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/webapps/docs/architecture/startup/4_catalina_start_2.plantuml b/webapps/docs/architecture/startup/4_catalina_start_2.plantuml
index 0f16fd6cb4..9c02c4de6e 100644
--- a/webapps/docs/architecture/startup/4_catalina_start_2.plantuml
+++ b/webapps/docs/architecture/startup/4_catalina_start_2.plantuml
@@ -84,7 +84,7 @@ Container -> Container: fireLifecycleEvent(\n START_EVENT)
group If backgroundProcessorDelay > 0 (Engine defaults to 10, other Containers -1)
Container -> UtilityExecutor ++: scheduleWithFixedDelay()
-UtilityExecutor -> ContainerBackgroundProcessor **
+UtilityExecutor --> ContainerBackgroundProcessor **
note right of ContainerBackgroundProcessor
Re-created
automatically
diff --git a/webapps/docs/architecture/startup/4_catalina_start_2.png b/webapps/docs/architecture/startup/4_catalina_start_2.png
index 71af65b961..b417126970 100644
Binary files a/webapps/docs/architecture/startup/4_catalina_start_2.png and b/webapps/docs/architecture/startup/4_catalina_start_2.png differ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org