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 8887811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:54:04+00:00 2026-06-14T21:54:04+00:00

Question: In a webapp, we have to call a Webservice with Input as N(100)

  • 0

Question: In a webapp, we have to call a Webservice with Input as N(100) number so that the webservice would get the responses from the queue. Once I get the 100 responses I have to divide it in 5 threads and divide this responses accordingly (20 each) for each thread.
And once the processing of the thread is done, it should again call the webservice.

I have the webservice which would return responses depending on the Input number but I don’t know what technology I should use to implement the other part.

I have researched on following:

  1. Spring Task Execution: http://static.springsource.org/spring/docs/3.0.x/reference/scheduling.html – but this won’t fit as I can’t specify how many threads I need to start.

  2. Partitioning: section7.4: http://static.springsource.org/spring-batch/reference/html/scalability.html – I just came across this but haven’t worked with this earlier.

It would be great if any one of you could guide me in the right direction.

This is my first post so I apologize if there are any mistakes.

Update: 11/21/2012: I have implemented with the ThreadPoolTaskExecutor. I will post my code snippet after the vacation. But one thing that bugs me is I have to divide the 100 results into group of 20 and have the taskExecutor.submit(); in the For Loop to loop for 5 times which would create 5 threads. It would be nice to have a straight forward way where I submit this 100 requests and can choose how many threads I would like to spawn.

Happy ThanksGiving guys. will update the post after holidays

  • 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-14T21:54:05+00:00Added an answer on June 14, 2026 at 9:54 pm

    For using Spring Task Execution, you mentioned “but this won’t fit as I can’t specify how many threads I need to start.”

    Actually using ThreadPoolTaskExecutor you can achieve this quite easily.

    <bean id="taskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
      <property name="corePoolSize" value="5" />
      <property name="maxPoolSize" value="10" />
      <property name="queueCapacity" value="25" />
    </bean>
    
    <bean id="taskExecutorExample" class="TaskExecutorExample">
      <constructor-arg ref="taskExecutor" />
    </bean>
    

    The corePoolSize attribute here sets the number of threads to start initially.

    You may read 25.2.2 Using a TaskExecutor in http://static.springsource.org/spring/docs/3.0.x/reference/scheduling.html

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

Sidebar

Related Questions

I am making a webapp. I have a fairly basic question about javascript performance.
I have a webapp written in PHP using a MySQL database backend. This question
I've to evaluate some mobile technologies and have one question. We have webapp. It's
I'm new to CodeIgniter and I hope that my question will have a simple
I have a question regarding cross-origin policies. I have a web app that gets
I am buidling some webapp and have implemented long-polling (and a command queue in
My question is that suppose, in my web app, I use ajax to call
I have a Django-based webapp that is using PostgreSQL as the backend via psycopg2.
We have some applications (web and WPF) that call WCF services to access data.
I have a system tray icon that receives incoming phone calls. When a call

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.