Tagged articles
22 articles
Page 1 of 1
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Feb 7, 2025 · Fundamentals

Mastering Java Class Loaders: Break and Follow the Parent Delegation Model

This article explains how to create custom Java class loaders by extending java.lang.ClassLoader, when to override findClass versus loadClass, demonstrates both adhering to and breaking the parent delegation model with complete code examples, and discusses common scenarios such as web servers, SPI, and hot deployment where the delegation mechanism is intentionally altered.

Backend DevelopmentCustom Class LoaderJVM
0 likes · 11 min read
Mastering Java Class Loaders: Break and Follow the Parent Delegation Model
Alibaba Cloud Developer
Alibaba Cloud Developer
Dec 3, 2024 · Fundamentals

Unraveling Java’s ClassLoader: From Parent Delegation to Custom Loading

This article explores Java's class loading mechanism in depth, covering when and how classes are loaded, the parent‑delegation model, the internal role of ClassFileParser and InstanceKlass, parallel loading nuances, and practical ways to break or extend the delegation chain with custom class loaders.

CustomClassLoaderInstanceKlassJVM
0 likes · 17 min read
Unraveling Java’s ClassLoader: From Parent Delegation to Custom Loading
macrozheng
macrozheng
Oct 25, 2024 · Fundamentals

Why and How Java Breaks the Parent Delegation Model: Real-World Scenarios

This article explains the purpose of Java's parent‑delegation class‑loading mechanism, describes its three built‑in loaders, shows how custom loaders can override it, and explores common situations—such as JNDI, JDBC, Tomcat, and OSGi—where developers intentionally break the delegation for flexibility and modularity.

Custom ClassLoaderJDBCJNDI
0 likes · 11 min read
Why and How Java Breaks the Parent Delegation Model: Real-World Scenarios
Top Architecture Tech Stack
Top Architecture Tech Stack
Aug 27, 2024 · Backend Development

Understanding Java's Parent Delegation Model for Class Loaders

The article explains Java's parent delegation model for class loaders, its benefits for stability and security, how to break it by customizing loadClass or using thread‑context class loaders, and illustrates common scenarios such as JNDI, JDBC and Tomcat's own class‑loader hierarchy.

JVMJavaParent Delegation
0 likes · 10 min read
Understanding Java's Parent Delegation Model for Class Loaders
Su San Talks Tech
Su San Talks Tech
Jun 24, 2024 · Fundamentals

How to Break Java’s Parent Delegation Mechanism and Why It Matters

This article explains the purpose of Java's parent delegation class‑loader mechanism, describes its three built‑in loaders, and details common scenarios—such as JNDI, JDBC, Tomcat, and OSGi—where developers intentionally break the delegation to achieve flexibility and isolation.

Custom ClassLoaderJDBCJava
0 likes · 10 min read
How to Break Java’s Parent Delegation Mechanism and Why It Matters
Top Architect
Top Architect
Nov 23, 2023 · Backend Development

Understanding Java Class Loading Mechanism and Tomcat’s ClassLoader Design

This article explains the Java class loading mechanism, the parent‑delegation model, how it can be broken, and then details Tomcat’s custom classloader hierarchy—including CommonClassLoader, CatalinaClassLoader, SharedClassLoader, and WebappClassLoader—showing why Tomcat deviates from the standard delegation model.

JavaParent DelegationTomcat
0 likes · 15 min read
Understanding Java Class Loading Mechanism and Tomcat’s ClassLoader Design
Java High-Performance Architecture
Java High-Performance Architecture
Aug 31, 2023 · Backend Development

Why Tomcat Breaks Java’s Parent Delegation Model: Inside Its Class Loader Design

This article reviews Java’s default class loading mechanism, explains the parent‑delegation model, then details how Tomcat’s custom class loaders (Common, Catalina, Shared, Webapp, Jasper) intentionally deviate from that model to achieve isolation, versioning, and hot‑swap capabilities for web applications.

Class LoaderJVMJava
0 likes · 15 min read
Why Tomcat Breaks Java’s Parent Delegation Model: Inside Its Class Loader Design
IT Services Circle
IT Services Circle
Mar 11, 2023 · Fundamentals

Understanding Java Class Loaders and the Parent Delegation Model

This article explains the Java class‑loading mechanism, reviews the load‑link‑initialize process, describes the built‑in Bootstrap, Extension and Application class loaders, introduces the parent‑delegation model, shows its execution flow with code examples, and discusses how to customize or break the model.

Custom ClassLoaderJVMJava
0 likes · 16 min read
Understanding Java Class Loaders and the Parent Delegation Model
Sanyou's Java Diary
Sanyou's Java Diary
Feb 6, 2022 · Fundamentals

Demystifying Java Class Loading: Steps, ClassLoaders, and Common Pitfalls

This article explains the Java class loading lifecycle, the different built‑in and custom ClassLoaders, the parent‑delegation model, reasons for breaking it (e.g., JDBC and Tomcat), how to implement custom loaders, hot‑deployment techniques, and includes typical interview code questions.

Hot DeploymentJVMParent Delegation
0 likes · 13 min read
Demystifying Java Class Loading: Steps, ClassLoaders, and Common Pitfalls
Ops Development Stories
Ops Development Stories
Jan 14, 2022 · Fundamentals

When Does Java Load a Class? Exploring the 7 Stages, Parent Delegation, and Custom ClassLoaders

This article explains the complete Java class loading lifecycle—including loading, verification, preparation, resolution, initialization, usage, and unloading—details the seven scenarios that trigger active loading, illustrates the parent delegation model, and provides code examples for custom and Tomcat class loaders.

Custom ClassLoaderJVMJava
0 likes · 16 min read
When Does Java Load a Class? Exploring the 7 Stages, Parent Delegation, and Custom ClassLoaders
Selected Java Interview Questions
Selected Java Interview Questions
Nov 15, 2021 · Backend Development

Understanding Java Class Loading, the Parent Delegation Model, and Tomcat’s Custom ClassLoaders

This article reviews Java’s default class loading mechanism and parent‑delegation model, explains how the model can be broken, and details Tomcat’s custom classloader architecture—including Common, Catalina, Shared, Webapp, and JSP loaders—showing why Tomcat deviates from the standard delegation hierarchy.

Backend DevelopmentJavaParent Delegation
0 likes · 14 min read
Understanding Java Class Loading, the Parent Delegation Model, and Tomcat’s Custom ClassLoaders
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 19, 2021 · Backend Development

Understanding Java's Parent Delegation Model: Mechanism, Implementation, and How to Break It

This article explains Java's parent delegation class‑loading model, describes the four built‑in class loaders, details why delegation is needed, shows the loadClass implementation, and discusses how and why the mechanism can be overridden in frameworks such as JDBC, Tomcat, OSGi, and the Java 9 module system.

Custom ClassLoaderJVMJava
0 likes · 14 min read
Understanding Java's Parent Delegation Model: Mechanism, Implementation, and How to Break It
Selected Java Interview Questions
Selected Java Interview Questions
Jun 12, 2020 · Fundamentals

Deep Dive into Java ClassLoader, Class Loading Process, and the Parent‑Delegation Model

This article explains when and how Java classes are loaded, details the JVM's ClassLoader implementation—including the native defineClass1 method, InstanceKlass creation, SystemDictionary registration, and parallel loading locks—then demonstrates breaking the parent‑delegation model with a custom ClassLoader and discusses practical usage scenarios.

JVMJavaMetaspace
0 likes · 18 min read
Deep Dive into Java ClassLoader, Class Loading Process, and the Parent‑Delegation Model
Yanxuan Tech Team
Yanxuan Tech Team
Mar 9, 2020 · Fundamentals

Mastering Java ClassLoaders: Core APIs, Parent Delegation, and Agent Isolation

This article explains what a Java ClassLoader is, details its core APIs such as defineClass, findClass, loadClass, and findResource, describes the parent‑delegation model, and demonstrates how custom ClassLoaders can be used for class isolation in Java agents, illustrated with real‑world log4j2 pitfalls and solutions.

Class IsolationJavaJava Agent
0 likes · 15 min read
Mastering Java ClassLoaders: Core APIs, Parent Delegation, and Agent Isolation
Senior Brother's Insights
Senior Brother's Insights
Nov 12, 2019 · Fundamentals

What Really Happens When Java Loads a Class and Creates an Object?

When Java executes a new expression, the JVM first ensures the class is loaded using the parent‑delegation model, then follows a five‑step loading and linking process before allocating heap memory, initializing fields, running static and instance code, and finally returning a reference to the new object.

InitializationJVMJava
0 likes · 8 min read
What Really Happens When Java Loads a Class and Creates an Object?