0 Replies Latest reply on Dec 10, 2012 9:18 PM by Haruhiko Nishi

    Suppressing the generation of DelegatingClassLoader

    Haruhiko Nishi Newbie

      While analyzing a heap dump using Yourkit we have observed many instances of DelegatingClassLoader created under application running in JBoss environemnt.

      It is allegedly used for some sort of reflection optimization mechanism according to the url at http://www-01.ibm.com/support/docview.wss?uid=swg21566549.

      Becuase this is what seems to be eating up our memory allocated for PermGen, as the number of the DelegatingClassLoader is gradually increased and ends up with OutOfMemoryError, we have tried setting sun.reflect.inflationThreshold = 0 as suggested thereby. However it does not seem to be working as we are still seeing DelegatingClassLoaders getting generated.

      We also scrutinized the source code corresponds to where the property is set and the value is retrieved.




      Looks to me that specifying 0 will not have any effect on suppressing the generation of the DelegatingClassLoaders. The value apparently needs to something very big and

      Integer.MAX_VALUE is something we want to use in order to turn that feature off forever.


      My question is, why there are a lot of mentioning about setting this property value to 0? Will it be safe to set this value to some very large number?