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

  • SEARCH
  • Home
  • 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 8118425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:29:08+00:00 2026-06-06T04:29:08+00:00

I have devoloped a WebService (WS1) in Java which is deployed in a Tomcat

  • 0

I have devoloped a WebService (WS1) in Java which is deployed in a Tomcat Server.
If certain conditions are met, WS1 needs to invoke another WebService (WS2) to run in parallel. Is this possible? or does the WS1 has to wait for the response of WS2 to keep running. The point of this is not delaying the response of WS1 as it is not dependant of WS2. However, WS2 trigger IS dependant of WS1 and that’s how my problem starts.

My hipothetical solution to this issue is to create a separate servlet which invokes WS2 without delaying WS1. How can I implement it or can anyone think of a better solution?

  • 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-06T04:29:10+00:00Added an answer on June 6, 2026 at 4:29 am

    It depends what you want to achieve. If you just want to kickoff the second WS, you could create a new local thread and do the call. The second WS might even support asynchronous calls so that you are not blocked after calling it. Creating a new thread would work as follows.

    First, you need a class for this thread. This class would take care of communicating with WS2:

    class ThreadForWS2 extends Thread {
      public void run() {
        // invoke WS2 here
      }
    }
    

    In your WS1 request handler, you just need to kick-off this thread, e.g.:

    Thread threadForWS2 = new ThreadForWS2();
    threadForWS2.start();
    

    That’s it, but of course there are many ways in Java to create another thread. That’s up to you to investigate the best possible solution.

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

Sidebar

Related Questions

I have developed a WebService which will be accessed by 1000's of users at
This is a performance based question. I have developed a Java EE Webservice Application
I have developed a webservice using Apache CXF ,which will be in production very
So I have a client that needs to be running tomcat for various things
I have developed an applet java with Eclipse, which is included in MyPage.html. I
I have developed a WCF WebService. On client side they are unable to send
I have developed a web app using a webservice. Everything works fine in the
I have developed a web service and host it on my server and I
I have developed an app which shows the time in a full screeen. The
We have developed a web application which consumes a web service. The user will

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.