Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Servlets with Multithreading

843841Dec 8 2004 — edited Dec 8 2004
Hi,
I am designing an application using JSP and Servlets. I dont have much experience with Threads, and was wondering if the forum could help me out.
The Servlet needs to call multiple stored procedures to get reports on different Deal Types. The different Deal types can be Equities, Bonds, Options etc. I could of course put the whole thing in a loop and then call the different stored procedures one by one to generate the report for each deal type. But this would be time consuming.
I was wondering if i could create a thread per deal type, which would simultaneously get reports for each deal type. The Servlet would return the results to the JSP page only after all the threads have completed. Hence it would wait for all to complete, but if multithreaded all can go on simultaneously and improve performance.
Would this be a good way to develop the system? Can someone point me in the right direction as to how i can achieve this?

Thanks,
Neet

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 5 2005
Added on Dec 8 2004
4 comments
168 views