works just as you designed. Because in your case the request takes all the processing of long running operation inside itself. So after response comes - progress not needed anymore.
request which should activate progress should run the process in separate thread for example.
ilya_shaikovsky, You are correct. It works as designed. But how do you make the progress bar work in a method that takes a long time?
The progress bar waits for the method to return! Once the method returns processing is already completed - then you don't see a progress bar.
Does anyone know how to get this example to work?
Just run new thread in your method which will perform this operation. Your long running operation should not keeps the request, which was sent to start the operation, all the time. Something like defined in our richfaces demo push example but adopted to your case.
The solution to the problem was to have the servlet, or backing bean, issue an asynchronous request to the EJB layer via MQ (this is a std pattern). Hence the web request does not wait for the EJB layer to finish processing.
Hope this helps.