Hey there,
I had to do the same thing a couple of projects ago. What I adopted was the "Orbitz" model. In my case we were not using JMS but manually handling it via
java threading. Here are the steps:
1. Process initial request
2. Spawn
thread to do long task
3. Forward user to page with flashing/filling/rotating 'processing' image.
4. 'Processing' page has javascript function to ping the server every 2 seconds to see in the thread has finished. If it is unfinished it continues to flash.
5. Eventually the thread completes processing and sets a flag on a servlet/EJB.
6. The 'Processing' page then sees the data is ready and the servlet forwards the request to a results page.
I hope that helps.
Tom
SCJP '02, SCWCD '02, SCJD '08, SCSNB '09, SCEA '10