memory « Session « JPA Q&A





1. How to force hibernate to release memory once the session is closed?    stackoverflow.com

We've just recently started using Hibernate and are still getting used to the way it works. On of the things we've seen is that even after all sessions are closed and references ...

2. Out of memory error with 2 same calls in same session    forum.hibernate.org

Author Message Stef_Kuypers Post subject: Out of memory error with 2 same calls in same session Posted: Thu Oct 15, 2009 9:59 am Newbie Joined: Fri Aug 14, 2009 8:06 am Posts: 19 Hi, I'm getting an out of memory error when executing the following code: Code: session = HibernateUtil.getCurrentSession(); session.beginTransaction(); List accents = Data.ACCENT.getAll(); accents = Data.ACCENT.getAll(); The ...

3. Session Memory Management    forum.hibernate.org

Hi all, I have problem where I believe that Hibernate (using it with JPA :( ), is holding onto entities way too long. Essentially this is the situation problem: I have process, that needs to pull out a crap load of records (entities) from the database and update them all in one transaction. I have added paging logic so that it ...

4. Session Memory Management Revisited.    forum.hibernate.org

Hi folks this is follow up from a previous question (which I was able to answer). This is one is slightly different (in this case we are in fact creating new entities) but essentially the same problem, the JPA EntityManager (session) is holding on to entities longer then it needs to. The psuedo code below more or less does this: (fetch ...

5. Memory leak when building SessionFactory from xml    forum.hibernate.org

Hi all, I think I detected a classloader memory leak when hibernate loads its configuration from a xml file. I'm not sure if it's and Hibernate problem or a Dom4J problem, but the real thing is that the entire web-application does not get garbage collected. I reported an issue (HHH-5601), but no response yet. Bellow the description as reported in the ...

6. Memory Probelms with two session factories    forum.hibernate.org

Newbie Joined: Tue Jul 27, 2010 5:19 am Posts: 4 Hi, I am creating two hibernate session factories using Spring. I get memory heap space when i start my application. I know its expensive to create a session factory but i need to create two as they point to two different datasources. Can i somehow load these hbms only once.I think ...

7. SessionFactory -- takes up too much memory and sits idle    forum.hibernate.org

Hi, I have a web application which makes use of the Hibernate for accces to DB. This is the configuration i am running. Hibernate -2.1 RDBMS - DB28.1 OS- Red Hat Linux (AS 3.0) 2 GB RAM, 1CPU (2 machines - 1for JBOSS, 1 for DB2). When my web application starts, at the time when the Hibernate tries to build up ...

8. Open session in view + JSTL forEach = memory leak?    forum.hibernate.org

Hi folks. I have a Struts-based hibernate app which I've been working on for quite a while. Recently, as my objects grow larger and more complex, it's come to my attention that I've got a memory leak (our staging server was going down after a day of heavy use with OutOfMemory errors). Using JProfiler, I had a look at the heap ...

9. Open session in view + JSTL forEach = memory leak?    forum.hibernate.org

Hi folks. I have a Struts-based hibernate app which I've been working on for quite a while. Recently, as my objects grow larger and more complex, it's come to my attention that I've got a memory leak (our staging server was going down after a day of heavy use with OutOfMemory errors). Using JProfiler, I had a look at the heap ...





10. Multiple SessionFactories and Memory    forum.hibernate.org

I am new to Hibernate, doing an evaluation for my company. I am using the latest release (3.1) and I generated my mapping files and POJOs using the beta 2 of the tools. My question deals with my company's systems are setup and using Hibernate within this setup. We are an ASP and we have several hundred customers and growing. Each ...

11. PermGen memory leak when creating many SessionFactories?    forum.hibernate.org

Hibernate version: 3.1.3 Full stack trace of any exception that occurs: 2006-05-12 01:14:15,387 ERROR SocketListener0-1 proxy.BasicLazyInitializer CGLIB Enhancement failed: com.test.MyBean 2006-05-12 01:14:15,479 ERROR SocketListener0-1 proxy.BasicLazyInitializer net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null 2006-05-12 01:14:24,121 ERROR SocketListener0-1 tasks.BaseTask -run() Throwable: PermGen space 2006-05-12 01:14:24,121 ERROR SocketListener0-1 tasks.BaseTask java.lang.OutOfMemoryError: PermGen space. Name and version of the database you are using: DB2 8.2.2 DB2 8.1.6 DB2 8.1.3 HSQLDB 1.8.0.4 ...

12. Session Memory    forum.hibernate.org

Hi, I am mapping about 150 000 objects (from 1 table) in my app with hibernate and I see that jboss process does not release memory flushing and closing my session. About 100mo for each group of select. Have you got any idea to release memory used by objects ? Thanks, Regards,

13. Using hibernate session to hold table in memory.    forum.hibernate.org

Hi I need to hold db table in memory due to performance problems (many selects on this table each iteration). I thought to use hibernate session for this , when the application is up i will load all objects into the session (select * from table) and keep the session open so my data will be updated.In runtime i will use ...