why tomcat has its own classloader. what is the advantage of having user defined classloader
It isolates the various webapplications deployed into the container; that is, the behaviour of a webapplication will not be affected by (un)deploying another webapplication.
Each webapp only sees its own classes, not those provided by the other applications. This allows different webapps to use different versions of the same class. Deploying several webapplications would be a nightmare without that isolation.
Similarly, OSGI bundles get their own class loaders so different bundles can use different versions of the same plugin. Again, this isolation makes it less likely that adding a plugin (with its depedent libraries) will affect the other plugins in the system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With