why tomcat has its own classloader. what is the advantage of having user defined classloader
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.