This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Memory Issues with JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Memory Issues with JPA" Watch "Memory Issues with JPA" New topic
Author

Memory Issues with JPA

Nilesh Chhapru
Greenhorn

Joined: Sep 03, 2011
Posts: 3
Hi all,

I am facing memory problem when after the J2EE application is running for more than 3-4 hrs with 20-40 users.
I have a 3-Tier J2EE application distributed as under

1) Data Access Layer (JPA 2.0 with Eclipse Link - EJB 3.1).
2) Business Logic Layer (EJB 3.1)
3) Presentation Layer (JSF 2.0).
Server Used is Glassfish 3.0.1 on windows 2003 server.

Kindly suggest as the memory used by Glassfish Process is insane.

Regards,
Nilesh Chhapru
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9912
    
158

Nilesh,

Welcome to the forums!

Kindly suggest as the memory used by Glassfish Process is insane.

You'll need to be much more specific on the memory usage and why you think the memory used by Glassfish is insane. Are you sure it's not your application which is using up that memory? Have you done any profiling using a profiler? What does it show?


[My Blog] [JavaRanch Journal]
Nilesh Chhapru
Greenhorn

Joined: Sep 03, 2011
Posts: 3
Thanks for the reply....

I have used jmap command on the glassfish process id and it gives high memory for all persistence classes.
Also, if there is issue with the code or Application then that would behave the same after i deploy and not after 4-5 hrs with 30-40 users.

Regards,
Nilesh Chhapru.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9912
    
158

Nilesh Chhapru wrote:
Also, if there is issue with the code or Application then that would behave the same after i deploy and not after 4-5 hrs with 30-40 users.


Not really. An application which holds on to the objects can lead to a memory leak over time and since you mention that it's the application's persistence classes, then the chances are that it might be a application issue than anything to do with GlassFish. You'll have to check how those persistence classes are being used in your application and why those accumulate over time.
Nilesh Chhapru
Greenhorn

Joined: Sep 03, 2011
Posts: 3
its still a doubt to me....

i am also not able to know that where is the problem in the architecture...
can you guide me on to how to know the exact issues in step by step...


Regards,
Nilesh Chhapru.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Memory Issues with JPA
 
Similar Threads
Is it possible to use JPA 2.0 with EJB 3.0? (not EJB 3.1)?
JPA 2.0, JSR 303 Bean Validation, and Resource Bundle
JEE example with EJB, JSF is not working
Is the statement about EJB 3.x right?
Hi