-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: JPA memory heap problem
PostPosted: Mon Nov 12, 2007 12:46 am 
Newbie

Joined: Sun Nov 11, 2007 7:57 am
Posts: 1
Hello,

I am using JSF and JPA for my web based project ( No EJB and No Spring frame work) . I am facing the problems related to memory usage due to the persistence.

Project Requirement :
I need to display the web pages with data from the database tables. Where I have some operations like adding new record and editing the record. I have more than 10 pages like this.

Problem:
Since I am using the JPA to avoid the tight interaction with the DB, the data are persisted in the memory, Which leads to the Java Heap Memory problem, when I am going to one page to another. Because the page has to show all records from the database table (Lazy loading is used for the LOB). So I, cleared and closed the Entity Manager after the data fetched from DB. But it doesn't make any difference. The JVM memory heap also -Xmx4096m (i have added upto 40p6 MB to solve the problem). Still the problem persists.

Configuration:
JPA : Application Managed Entity Manager and Resource Local Transaction.
The development Server : Tomcat 5.5
JEE : Java 5 with Annotation

Please correct me, if I am wrong and help me to fix this problem.


Top
 Profile  
 
 Post subject: ValueListHandler
PostPosted: Mon Nov 12, 2007 5:19 am 
Newbie

Joined: Tue May 17, 2005 8:55 am
Posts: 11
I think fetching all data in the memory is the wrong approach!

You tried this pattern:

http://java.sun.com/blueprints/corej2eepatterns/Patterns/ValueListHandler.html
http://valuelist.sourceforge.net/

??




[/url]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.