-2

I am working with medium sized Java web application. I need to create 25 Spring Managed services and DAO;s and and around 20 JSF Managed beans.Along with this I have around 20 model classes. In this 20 are session scoped beans.How can I effectively do memory management with all the beans. How can I efficiently work with session scoped beans? How much heap memory is required for this kind of application. I am mostly using annoatations.Does this increase my performance.Please suggest.

SRy
  • 2,901
  • 8
  • 36
  • 57

2 Answers2

1

i have used java profilers but i am not satisfied with output for actual performance tuning and memory usage currently we have been switched to java melody. This not only help performance optimization in dev but also in production system too. Java melody is very easy to integrate and configure and in production you can enable or disable by just updating web.xm

Jigar Parekh
  • 6,163
  • 7
  • 44
  • 64
  • @Jigar....Can I use "Execute garbage collector" in Production Environment.Does it really do the garbage collection.I see it in local doing very well. – SRy Oct 25 '12 at 18:28
  • Yes it should not be problem.. Why do u have doubt for gc in prod? – Jigar Parekh Oct 25 '12 at 20:13
  • but according to documentation of this project any one who can access this site can do garbage collection as we have to append "monitoring " at the end of the url to see all monitoring thing – SRy Oct 25 '12 at 21:08
  • you can have extra security on melody refer to http://code.google.com/p/javamelody/wiki/UserGuide#16._Security – Jigar Parekh Oct 26 '12 at 05:29
0

How can effectively memory management all the beans.

Unless memory profiling indicates that you have a real problem with excessive memory usage, the best strategy is to just let the GC deal with the memory management.

As @BalusC said: "measuring is knowing".

How can I efficiently work with session scoped beans?

Ummm ... that question is too open ended to be answered.

How much heap memory is required for this kind of application.

It depends on the application ... obviously.

I am mostly using annoatations.Does this increase my performance.

It should make little difference either way ... I'd have thought.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • I have some memory Issues in my application right now.Can you please suggest the good memory profiling tool? Other than objects what are the memory prone categories in Java? – SRy Oct 25 '12 at 06:06
  • http://stackoverflow.com/questions/2921390/java-profiling-tool-for-linux – Stephen C Oct 25 '12 at 06:40