File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Processing large Set of SQL Data and MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Processing large Set of SQL Data and MVC" Watch "Processing large Set of SQL Data and MVC" New topic

Processing large Set of SQL Data and MVC

Tim Jones

Joined: Apr 06, 2008
Posts: 28
What is the best way to retrieve large sets of data from a database? One option I tried was to create a Method within the Model Class (MVC) and store the raw data within a Map and pass it to the Controller Class to process it, but this quickly results in OutOfMemory Exception. Another option, is to process the raw data without storing it within a Collection. The problem here is that the processing has to take place within the Controller Class, this requires opening a connection to the database and retrieving the data but this is breaking MVC Rules as it is the job of the Model to communicate with database, Controller sits in the middle and passes data from model to view and vice versa. Some suggestions will be appreciated.
I agree. Here's the link:
subject: Processing large Set of SQL Data and MVC
It's not a secret anymore!