Hi. I am running an extremely basic test application that simply creates a SessionFactory, opens a session (via getCurrentSession()), and then closes the session and the sessionFactory (nothing happens in between).
The CPU percentage goes through the roof (above 100% on a unix box - I am monitoring the top command) while the session factory is being initialized.
What could be causing this excessive usage of the CPU? When I run this simple application on a Unix server, The initialization takes @ 35 to 38 seconds.
One of the entities that I am specifying a mapping file for in the hibernate config is a view that joins several files, but I have not issued any queries at all for this entity (there are @ 15-20 mapping files configured in total). I am simply creating the SessionFactory and getting a connection (session), so I am assuming that the mapping files are being read, and then connection pool is being established. (The connection pool setting = 10). I have tried various connection pool settings (=3, =1).
I have also have several hibernate-based standalone java processes running on a separate unix server that run via cron on scattered intervals. When one of the intervals intersect for say, three of the processes, they each consume 3x% of the CPU each.
Any insights on the cause of the CPU usage would be greatly appreciated. Thanks.
* Hibernate version: 3.2 *
|