Current location - Loan Platform Complete Network - Big data management - How to deal with large data volume processing in java web projects
How to deal with large data volume processing in java web projects
Since it's asynchronous processing, it's not simultaneous with the client's request, so it has nothing to do with session either. Asynchronous processing also has nothing to do with EJB.

1. When a client requests a data operation, your javabean stores the request in a file, and then you can return a response to the client.

2. Make your own application program, a thread, that listens to that file (or a directory) at intervals, and if it finds a new file, reads it, and performs a long operation as requested. When the operation is finished, update a flag A (either in the database or in the file) and remove the file (to avoid repeating the operation on this file).

3. Customers will always refresh the page or send a new page request from time to time, this time to check the flag A, if completed, on the page to prompt the user, such as msdn's "you have a short message"