This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am developing an application. In my application, i need to export list of records from the database to CSV file format after user click on Export button. But, this require a lot of time because the client im dealing with have more than million records in the database.
I am wondering if i can create run in a background function to export the records. Whenever they click the button, it will redirect to another page while the exporting process running in a background. Anyone have any suggestion?
You'll want to create a separate thread for the background job so that it doesn't interfere with whatever the user does in the foreground. The Sun Java Tutorial has an extensive section on concurrency.