Tagged articles
Parent Delegation
24 articles · Page 1 of 1
This article explains why a custom java.lang.String class cannot replace the JDK's String, detailing the parent delegation class loading model, Bootstrap ClassLoader's role, core class protection mechanisms, Java 9+ module system restrictions, and why attempts to bypass these (custom class loaders, -Xbootclasspath, --patch-module, Java Agents) fail or are unsafe.
Bootstrap ClassLoaderClass LoadingCore Class Protection
0 likes · 23 min read

The article examines six practical situations—SPI, Tomcat WebAppClassLoader, OSGi bundles, JDBC driver loading, custom ClassLoaders, and Java agents—where Java’s default parent‑delegation class‑loading mechanism is intentionally bypassed, explaining the motivations, implementations, and associated risks of each approach.
ClassLoaderJavaOSGi
0 likes · 13 min read

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.
ClassLoaderCustom Class LoaderJVM
0 likes · 11 min read

This article explains Java's class loading mechanism, the three built‑in class loaders, the parent‑delegation model, reasons for using it, how to create custom loaders, and the detailed phases of loading, linking, initialization, usage, and unloading.
ClassLoaderJVMJava
0 likes · 11 min read

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.
ClassLoaderCustomClassLoaderInstanceKlass
0 likes · 17 min read

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.
ClassLoaderCustom ClassLoaderJDBC
0 likes · 11 min read

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.
ClassLoaderJVMJava
0 likes · 10 min read

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.
ClassLoaderCustom ClassLoaderJDBC
0 likes · 10 min read

This article explains Java's parent delegation mechanism—a core part of the JVM class‑loading process—detailing its purpose, three main benefits (avoiding duplicate loading, ensuring security, improving efficiency), and the step‑by‑step loading workflow illustrated with diagrams.
BackendClass LoadingJVM
0 likes · 6 min read

This article provides a detailed explanation of Java’s parent delegation model, covering its definition, visual diagrams, advantages and disadvantages, and a six-step loading process, helping readers understand how class loaders prioritize parent loaders to ensure security and avoid duplicate class loading.
BackendClass LoadingJVM
0 likes · 5 min read

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.
Class LoadingJavaParent Delegation
0 likes · 15 min read

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

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.
ClassLoaderCustom ClassLoaderJVM
0 likes · 16 min read

This article explains Java's class loading mechanism in depth, covering the class lifecycle stages, the three primary class loaders, the parent‑delegation model, caching behavior, and practical code examples for custom loaders and dynamic loading methods.
Class LoadingCustom ClassLoaderDynamic Loading
0 likes · 8 min read

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.
ClassLoaderHot DeploymentJVM
0 likes · 13 min read

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.
Class LoadingClassLoaderCustom ClassLoader
0 likes · 16 min read

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.
ClassLoaderJavaParent Delegation
0 likes · 14 min read

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.
Class LoadingClassLoaderCustom ClassLoader
0 likes · 14 min read

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.
Class LoadingClassLoaderJVM
0 likes · 18 min read

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

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.
Class LoadingInitializationJVM
0 likes · 8 min read

This article explains the three built‑in Java class loaders, their initialization via the Launcher, the parent‑delegation model, the role of the context class loader, how to create custom loaders, and the key changes introduced in Java 9, providing code examples and diagrams for each concept.
ClassLoaderCustom ClassLoaderJVM
0 likes · 15 min read

This article explains the Java class‑loading workflow, the three phases of loading‑link‑initialize, the role of different ClassLoader types, and how the parent‑delegation model works—including a custom ClassLoader example and reasons for breaking the model.
BackendClassLoaderJVM
0 likes · 12 min read

This article explains Java's class loading process, the sources of class files, the hierarchy of built‑in class loaders, the parent‑delegation model, and demonstrates how to create and use a custom NetworkClassLoader for dynamic remote class loading.
ClassLoaderCustom ClassLoaderJava fundamentals
0 likes · 13 min read
