Hi all,
imagine a (container-) application is creating multiple classloaders to host a couple of other/sub- applications.
There is a -say- root classloader for the container app. Each time a sub-application is loaded, the container creates a new classloader for this application.
Some sub-applications use the same classes, but they were not loaded by the container's classloader, so each sub-application (better: its classloader) loads the code for e.g. class A. Therefore permspace will be filled twice: once for sub-application #1 and once for sub-app #2.
What does this mean for sun's hot-spot optimization?
Will the same optimizations occur twice on class A, once for each class-loader?
Or, is there some "magic" built-in which avoids this? (Optimizations done once)
Somebody knows a link, were this is explained?
I am referring to a sun (server) vm shipping with jdk 1.6