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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:54:07+00:00 2026-05-30T17:54:07+00:00

I have a application which is deployed in tomcat 6 In this application I

  • 0

I have a application which is deployed in tomcat 6
In this application I have created a thread class which fetches 1000 records from a table and process them and store in 4 different tables in DataBase.
I am running two threads at a time to protect the process from deadlock.
Is there any way to schedule these threads accordingly to my cpu utilization.
ie. If there no cpu left then new thread will not be created.

  • 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-05-30T17:54:08+00:00Added an answer on May 30, 2026 at 5:54 pm

    If I correctly understood your issue, I think this case is considered in Joshua Bloch’s 2nd edition of “Effective Java”:

    If a server is so heavily loaded that all of its CPUs are fully
    utilized, and more tasks arrive, more threads will be created, which
    will only make matters worse. Therefore, in a heavily loaded
    production server, you are much better off using
    Executors.newFixedThreadPool, which gives you a pool with a fixed
    number of threads, or using the ThreadPoolExecutor class directly, for
    maximum control.

    Though I haven’t tried yet, using Executors seems to be a great idea.

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

Sidebar

Related Questions

I have a web application deployed on tomcat. In this application are ExecutorService to
I have a web application project which is deployed in tomcat 6. I can
I have web application which we deployed in a production . We have separate
I have an application which uses JSPs and Servlets and deployed on IBM-WASCE 2.1.
I have a asp.net web application which has a number of versions deployed on
I'm thinking how to arrange a deployed python application which will have a Executable
I have an application which extracts data from an XML file using XPath. If
I have a web application deployed on path /var/lib/tomcat6/webapps/abc/</code> in server.xml on path /etc/tomcat/server.xml
I have developed a java 1.4 web application.Application is deployed on jboss(tomcat). suppose my
I have a wicket application which can be deployed in different environments. One of

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.