Skip to content

Commit

Permalink
Add diagram of Quarkus hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
holly-cummins committed Jul 18, 2023
1 parent e43f855 commit 5444472
Show file tree
Hide file tree
Showing 3 changed files with 16,952 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/src/main/asciidoc/class-loading-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@ prevent the transformation, as the loaded class is not used at runtime.

== ClassLoader Implementations

Quarkus has the following ClassLoaders:
Quarkus has a number of ClassLoaders. This shows the relationship between them :

image::classloader-hierarchy.svg[alt=Quarkus ClassLoader hierarchy,role="center"]

Here are the roles of each ClassLoader:

Base ClassLoader::

This is usually the normal JVM System ClassLoader. In some environments such as Maven it may be different. This ClassLoader
is used to load the bootstrap classes, and other ClassLoader instances will delegate the loading of JDK classes to it.

Augment ClassLoader::
Augmentation ClassLoader::

This loads all the `-deployment` artifacts and their dependencies, as well as other user dependencies. It does not load the
application root or any hot deployed code. This ClassLoader is persistent, even if the application restarts it will remain
Expand All @@ -84,15 +88,15 @@ the builder classes are isolated, which means that use cases that want to custom

Deployment ClassLoader::

This can load all application classes. Its parent is the Augment ClassLoader, so it can also load all deployment classes.
This can load all application classes. Its parent is the Augmentation ClassLoader, so it can also load all deployment classes.

This ClassLoader is non-persistent, it will be re-created when the application is started, and is isolated. This ClassLoader
is the context ClassLoader that is used when running the build steps. It is also transformer safe.

Base Runtime ClassLoader::

This loads all the runtime extension dependencies, as well as other user dependencies (note that this may include duplicate
copies of classes also loaded by the Augment ClassLoader). It does not load the application root or any hot deployed
copies of classes also loaded by the Augmentation ClassLoader). It does not load the application root or any hot deployed
code. This ClassLoader is persistent, even if the application restarts it will remain (which is why it cannot load
application classes that may be hot deployed). Its parent is the base ClassLoader.

Expand Down
Binary file not shown.
Loading

0 comments on commit 5444472

Please sign in to comment.