Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8254169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:06:15+00:00 2026-06-08T01:06:15+00:00

I have a Java EE web application. Now when a particular request comes (say

  • 0

I have a Java EE web application. Now when a particular request comes (say /xyz url patter) I want to do complex procesing as follows

Each of the following 3 steps are very complex and takes time.

  1. Get data from one table from DB.Table has huge data and querying takes time.
  2. Make a web service call to some other webserive A and get its data.
  3. Make another web service call to some otheer webserice B and get its data .
  4. Do some processing by using output of 1, 2, 3

1, 2, and 3 are independent of each other so can be called in parallel.

Now the questions are:

  1. Can I do operations 1, 2, and 3 in three separate threads?
  2. Is it advisable to create 3 threads for each request?
  3. Should I use thread pooling?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:06:17+00:00Added an answer on June 8, 2026 at 1:06 am

    To address your first question I go through the 4 steps:

    1. Yes, if the database driver you are using allows concurrent access, respectively is safe to use from different threads.
    2. A web service is normally designed to deal with different requests at the same time so this should work as well, the question here is how many threads you want to use (and how long it takes to process one request) and whether the web service will guard itself against too many requests at once.
    3. The same applies here.
    4. Yes, but you have to do synchronization here, as in: wait until all threads have received their results. You can realize this with a java.util.concurrent.CyclicBarrier

    Second question
    That depends on your data and especially how fast the web services will answer, you should try it out.

    Third question Definitively, that’s what they are for. This will also help you to structure your application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java-JSF Web Application on GlassFish, in which I want to use
I have been a java web application developer,and now I work on .net framework.
I have a java web service application, i created a .WAR file. and now
I have a java web service application, i created a .WAR file. and now
My Java EE web application is working fine with Glassfish 2.1. Now I want
My Java EE web application is working fine with Glassfish 2.1. Now I want
I have a medium-size Java Web-application using Log4J as logging-framework. Right now i am
I have a java web application which I can debug using IntelliJ or Eclipse
I have a Java web application at my work and I'd like simplify how
i have three java based web application app1,app2 and app3 at production. All 3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.