usage « Session « JPA Q&A





1. Memory usage in Hibernate SessionFactory    coderanch.com

After initializing a Hibernate SessionFactory with over 800 mapping files, I profile my application and see that the SessionFactoryImpl is holding onto 475MB memory (mostly in the form of Strings and char[]). Is there any way to reduce this? In particular, is there a way for some of this memory be allocated when that particular entity/mapping is accessed so that an ...

2. Memory usage after initializing SessionFactory    forum.hibernate.org

I am profiling while loading my SessionFactory and find that after loading 800+ mapping files Hibernate is using approximately 475MB of heap space. Is this normal? Is it possible to have the EntityLoaders and SQL strings (which are taking up so much memory) allocated when the particular mappings are first used rather than during SessionFactory initialization? In general only a small ...

3. Usage of SessionFactory and Session    forum.hibernate.org

Hello After reading thru the Reference Doc and Hibernate in Action I'm still a bit unsure regarding the usage of SessionFactory and Session. Assuming I have a WebApplication (basically a servlet, created with SAP's WebDynpro technology) running unmanaged in an J2EE Application Server (SAP WebAS). This application will be used (hopefully) by many people concurrently. My question now is: should I ...

4. session.save(obj) becomes slower and slower, cpu usage peaks    forum.hibernate.org

I am running into a nasty insert problem: the code "works" but during stress test, the inserts become slower and slower from the console output: ----------------------------------------------------------- Hibernate: select DIGITAL_GIFT_ID_SEQUENCE.nextval from dual Hibernate: select DG_FULFILLMENT_ID_SEQ.nextval from dual very long delay here... Hibernate: insert into DIGITAL_GIFTS (PURCHASER_CUSTOMER_ID, RECIPIENT_CUSTOMER_ID, ORDER_ID, PRODUCT_ID, STATUS, PURCHASE_DATE, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATED, DIGITAL_GIFT_ID) values (?, ?, ?, ?, ?, ...

5. usage of threadlocal session    forum.hibernate.org

If using threadlocal sessions (As in HibernateUtil.java) then does this mean that one should never close the session because if one closes the session, there is no way to "reopen" the session. As a result does it mean that one has to call sessionfactory.opensession repeatedly for each request ? is keeping the threadlocal session an optimization only or is there anything ...

6. Some questions on SessionFactory.getCurrentSession() usage    forum.hibernate.org

When u r using same table and database, u have to get the session one time only. then u can use it as u want ... dont spend time to configure it every time. and tostring will giver errro. because it might not returning any object which can be represented as string.. Hardik.

7. session.flush() usage and issues    forum.hibernate.org

8. session.flush() usage and issues    forum.hibernate.org

9. hibernate sessionfactory memory usage for large database    forum.hibernate.org

I'm using hibernate 3.2.2 and jboss 4.0.5 I've a huge database to be mapped, consinsting of more than 2000 inter-related tables It's a legacy setup, so no changes could be done on the db. The problem is that the startup of the hibernate session factory takes more than 2gb of ram to start. using the verbose garbage collector, i've found out ...





10. reduce memory usage building sessionFactory    forum.hibernate.org