aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EntityManagerFactory init creates excessive objects? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EntityManagerFactory init creates excessive objects?" Watch "EntityManagerFactory init creates excessive objects?" New topic
Author

EntityManagerFactory init creates excessive objects?

Michal Glowacki
Ranch Hand

Joined: Mar 14, 2006
Posts: 114
hi,

I am profiling my java web app with YourKit to reduce memory usage and I have found out that one of the biggest memory occupants is created by javax.persistence.Persistence.createEntityManagerFactory

Have a look at memory allociations tree:

Name, Recorded Objects, Size
javax.persistence.Persistence.createEntityManagerFactory(String) 390292 160876904

going into lower levels, I can see this:

org.hibernate.util.ReflectHelper.classForName(String) 60165 124122640

and it's 2 subnodes:

java.lang.ClassLoader.loadClass(String) 33334 37485640
java.lang.Class.forName(String) 26831 86637000

is this correct behaviour?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EntityManagerFactory init creates excessive objects?
 
Similar Threads
nodding my head for these (scjp)
difference between == and equals()
GabageCollection
Instances of string objects
String -memory address