Giving a delayed response to the user while doing upload

Discussions

General J2EE: Giving a delayed response to the user while doing upload

  1. Hi,
       I have as screen which is for running a batch process which may take more than 15 minutes.. (say)..

      Once the user clicks on a button on the screen, I want to show the user that the process is on and, once the process is completed, I want to intimate the user abt that.. I cant keep the user waiting to get a response(till the process completes) as this will give a time out error..

       What would be the best way to do it..?Any help?

    Thanks
  2. It is unlikely that the user will stare at your screen for 15 minutes until the batch processing has completed, so it is probably best to tell them the work will happen asynchronously and that they should check back later, or that you will notify them via email when the work is done.

    Basically, you just have to solve the problem of how the user will know that the work is done. There are really two ways.

    1.) User polls your application... maybe they have some sort of "Inbox" of work in the application that lists the status of pending requests.

    2.) Application sends an email alerting the user when the work is completed.
  3. Hi Jacob,

       Thanks for ur time.. How can I implement an asynchronous process.. ?

             We can expect the user to check back after some time as I have a table which gets updated according to the status of the upload. The status can be viewed by the user using the same screen.


             Can u give some ideas about implementing an asynchronous process.. I am using J2EE and Websphere envmt

    Regards