in me J2EE web based application,user click a button on a page,this will call a long process.to avoid the browser waiting for reply,there are two solutions:
1. using messageing.the jsp call a message driving bean,and MDB call this process
2. using multi-thread.the jsp call a classA and classA start a thread in another classB(which call process).
which is better and WHY?
I would say that solution 1 is the best, because then you don't have have to deal with the threading issue - and that's one of the main reasons for using an application server. Creating your own threads will interfer with the thread handling in the app server and will potentially affect performance in a negative way.
I assume you don't want to present any results to the user, right?
Cheers and happy coding,
no,I can let user check result later