This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a really unique problem with this one..I have a database having 19 tables each of which contains more than 50,000 records and data keeps flowing to these tables (their size keeps increasing). I have joins on these tables. Now i have a web interface through which these data can be viewed. For each user logged in when i get records, the tomcat memory is used..to keep this data. After running this application for 1 day, tomcat gives an out of memory exception. How do i handle this memory problem.
PS: the users are not allowed to view all records. Different users have different rights.
That problem doesn't sound so unique to me; it's an old, old problem. Firstly, are you sure you don't have a memory leak? If you're confident that you don't then (and perhaps anyway) the solution is to implement some sort of caching such that there is a limit on the amount of memory the system will use (that you set). If that memory limit is reached you need some policy for clearing out space (e.g. least recently used data).
Even we are faced same problem in our application. First of all check for the memory leak, and try to reduce the data loading on the basis of some paging rule. And if you are using Rowset for data load, then try to use CachedrowSet.