Now a days ever application/web server provider is giving us the class loaders, like ejb class loader and web classloader. why they are providing these class loaders? what are the advantages i get by using them?
The classloaders are a part of the J2EE specification and also an essential part of a J2EE developer's nigthmares... Basically the existence of several classloaders can be seen as a "sandboxing method". That is, to allow two applications to coexist without interfering each other. For example, if two enterprise applications are being deployed into a single WebLogic and both are using Log4J for logging, would you like both of the applications to use the same logger instances due to a singleton class being "shared" between the two applications?