0

I could see in my application that no of loaded classes keeps on increasing as discussed here.

On using yourkit and help from the stack overflow community ,I was able to conclude that the classes getting increased is because of the reflection classes getting dynamically created as listed below:

  1. GeneratedConstructorAccessorXX
  2. GeneratedMethodAccessorXX
  3. GeneratedSerializationConstructorAccessorXX

    where XX is some number.

As per my knowledge and what I have come to know after googling, These are kind of runtime proxies used by reflection to access object information which is stored in the memory.These accessors are cached so that they dont have to be regenerated each time. These class objects are singleton per classloader, and hence we have only one instance of a generated accessor per classloader of a given Class. If this is the case,why I see the increase of loaded classes when I am running the repeat test.

Update* On further analysis I have observed that increased load is specifically because of GeneratedSerializationConstructorAccessor.

Community
  • 1
  • 1
Rips
  • 1,964
  • 1
  • 23
  • 45

1 Answers1

0

I will share my findings below and will accept this as answer unless someone else comes with something better. On further analysis and checking the stacktraces using your kit I was able to see thatGeneratedSerializationConstructorAccessor was getting created when any EJb bean calls was being made.Though it wasnt for every request that new such class was getting created. Another observation that found was that another application using EJB beans was also deployed on the same jboss server and was part of the test but we were not facing any such issue there.

One difference I could see was that the later application where no such issue was found was using EJB 3.X and where issue was found was having 2.X. May be it is the legacy version which is creating issue. It has been identified not a show stopper and its performance will be watched on the production.

Rips
  • 1,964
  • 1
  • 23
  • 45