I am using Spring, Hibernate, Java 1.6 etc. I am having a complex logic that has multiple Arralists and Maps created within a method. The data is loaded from database into Lists and then manipulated to get data ready for jsp pages. If the same action is performed quickly and multiple times from that page, it hits the action frequently. As the huge data is processed in action with lists and maps, the applications throws Java Heap OutOfMemory.
If I apply -Xms -Xmx, then it will help to some extent, if my data grows this option will loose to memory issue. I would like to know, is there any way to clear the list once we manipulate and pass them to Model for jsp pages.
OutOfMemoryis Error, not Exception and cannot be recovered from.