title: Retrieve large amount of data in Java Web App and download it to client
body: <p>Given:</p>
  
  <ul>
  <li>a web application running on <strong>websphere</strong> and a <strong>oracle database</strong> with large tables </li>
  <li>a jsf website that allows the user to download parts of the data in <strong>csv</strong> files. </li>
  <li>Normal way of accessing the DB is via JPA (openJPA)</li>
  <li>potential file download size is up to <strong>500MB</strong> to 1GB</li>
  </ul>
  
  <p>Problem:</p>
  
  <p>How to enable the user to download such large data exports from the DB via the web application on his client hard drive without OutOfMemory Exceptions/storing/buffering the complete data on the server</p>