File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action 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
Author

Processing large Set of SQL Data and MVC

Tim Jones
Greenhorn

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.
 
jQuery in Action, 2nd edition
 
subject: Processing large Set of SQL Data and MVC