Hi all, I am getting memory issues by using hibernate in my web application. After a lot of searching found a tool ‘Ecplise Memory Analyzer’ and found 3 suspects regarding the use of SessionFactory. Please suggest me how to manage it and some coding standards for hibernate dao class. I am pasting some screen shots of them:
Problem Suspect 1
One instance of “org.hibernate.internal.SessionFactoryImpl” loaded by “org.apache.catalina.loader.ParallelWebappClassLoader @ 0x3406b1328” occupies 13,949,880 (31.10%) bytes. The memory is accumulated in one instance of “org.hibernate.internal.SessionFactoryImpl” loaded by “org.apache.catalina.loader.ParallelWebappClassLoader @ 0x3406b1328”.
Keywords
org.apache.catalina.loader.ParallelWebappClassLoader @ 0x3406b1328
org.hibernate.internal.SessionFactoryImpl
Problem Suspect 2
The classloader/component “org.apache.catalina.loader.ParallelWebappClassLoader @ 0x3406b1328” occupies 4,831,120 (10.77%) bytes. The memory is accumulated in classloader/component “org.apache.catalina.loader.ParallelWebappClassLoader @ 0x3406b1328”.
Keywords
org.apache.catalina.loader.ParallelWebappClassLoader @ 0x3406b1328
Problem Suspect 3
5,985 instances of “java.lang.Class”, loaded by “” occupy 7,111,368 (15.85%) bytes.
Biggest instances:
•class java.lang.ref.Finalizer @ 0x340000668 - 1,771,352 (3.95%) bytes.
Keywords
java.lang.Class