The total number of loaded classes continues to increase

We tested the performance of one of our legacy applications when we found that the number of loaded classes was constantly increasing, which led to an increase in memory without heap.

Now I was looking for rootcauses. One thing I could think of is that in several places we use Class.forName, as shown below:

Test a = (Test) Class.forName(className, false, Test.class.getClassLoader()).newInstance();

Could this be the reason? If the classname is the same in the above code statement, does the .forName class call the same class again and again.

Application Server: Jboss 6.1 EAP

JDK: 1.6.27

+4
source share
1 answer

classloader , . , , .

, , . , .

+2

All Articles