aspose file tools*
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
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: 10050
    
163

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: 10050
    
163

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.
 
 
subject: Memory Issues with JPA