This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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?