- What are classloaders ?
- What is the significance of having multiple class loaders in Java ?
- When multiple web/enterprise J2EE applications are deployed in a single instance of Application Server what role do these multiple classloaders play ?
Class loaders follow a delegation model i.e. they request their parent to load the class (till the top level is reached) and if that does not happen it itself tries to load the class. Classes which are loaded by a classloader are not visible to it's parents or siblings but only to the child. This is how java manages namespace conflicts if multiple applications (using different version of common libraries like log4j, parsers etc.) are loaded in the same instance of the application server.

No comments:
Post a Comment