0

I have developed a JSF application and I am running into some funny behavior in that a lot of things such as navigation do not work and then apache will randomly lock up.

I started checking memory usage and the application is using about 1GB a memory to run. That seemed like a lot but I have no idea this is my first JSF application. This also is just with one user (one session) hitting the application.

Could there be a memory leak? Something else? Where can I start to look to try and figure out what is going on?

jmj
  • 237,923
  • 42
  • 401
  • 438
medium
  • 4,136
  • 16
  • 55
  • 66

1 Answers1

1
  1. Choose Bean scope as minimum as possible. Under its life cycle and then select the scope.
  2. It seems you are putting many data in session or application scope by mistake.
  3. Check JSF-Best Practices & JSF Performance Tuning
Community
  • 1
  • 1
jmj
  • 237,923
  • 42
  • 401
  • 438
  • I only have one main bean. On the view though I need to show many datatables, probably about 8. I have member varialbes within the main bean that store the temporary data for each table. I then have getters and setters to retrieve that information in the view. The calls to collect the data for the tables is only done one time and that is in the constructor of the main bean. Is this logically a bad idea? I was told never to put logic in the getter and setter methods because it will kill performance of the application. @org.life.java - Jigar Joshi – medium Jan 25 '11 at 13:57
  • It seems you are pulling whole DB table into memory , – jmj Jan 25 '11 at 13:58
  • no I am not pulling all of a db table just the information that will be used on the current view. The datatable calls a method that will I select what I need and store it in a member variable and then use the get method to retrieve it for a view. Is this the wrong approach? – medium Jan 25 '11 at 14:17
  • No this isn't , from the information you provided it is not clear to answer further – jmj Jan 25 '11 at 14:19
  • okay, thank you for your help I will read some of the standards documentation to try and determine my issue. Thank you again. – medium Jan 25 '11 at 14:20