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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:18:16+00:00 2026-05-31T19:18:16+00:00

We are creating a web app where we need to have concurrency for a

  • 0

We are creating a web app where we need to have concurrency for a few business cases. This application would be deployed in a tomcat container. I know that creating user defined threads in the web container is a bad idea and am trying to explore options that i have.

  1. Have my multi-threaded library used as a JCA component. We are averse to using this approach because of the learning curve that might be involved.
  2. I know that there’s WorkManager API’s available but i guess thats not implemented by tomcat so this option goes out.
  3. I did some research and found out that CommonJ library is recommended for Tomcat. Has anyone used it?
  4. Also, I see that there are ManagedExecutorService available but I am not sure how to use it and is it different from WorkManager API’s (and the commonJ library)?

Any help on this appreciated. By the way, using JMS is out of question because of deployment environment. I am inclining towards points 3 and 4 but i do not have much knowledge on it. Could someone guide pls.

  • 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-31T19:18:18+00:00Added an answer on May 31, 2026 at 7:18 pm

    Since you’re using Tomcat, don’t worry about it and do whatever you want. The Servlet section of Java EE makes no mention of threads etc. That’s mostly under the EJB section.

    Tomcat itself doesn’t do much at all in terms of worrying about managing threads, it’s a pretty non-invasive container.

    Its best to tie your threads to a ServletContextListener so that you can pay attention to the application lifecycle, and shutdown your stuff when you app shuts down, but beyond that, don’t overly concern yourself about it and use whatever you’re happy with.

    Addenda –

    The simple truth is Tomcat does not care, and it’s not that sophisticated. Tomcat has a thread pool for each of the HTTP listeners and that’s about the end of its level of management. Tomcat is not going to take threads from a quiet HTTP listener and dedicate them to a busy one, for example. If Tomcat was truly interested in how you create threads, it would prevent you from doing so — and it doesn’t.

    That means that thread management outside of the HTTP context falls squarely on your shoulders as an implementor. Java EE exposes these kinds of facilities, and the interfaces make great reads. But the simple truth is that the theoretical capabilities espoused by the Java EE API docs, and the reality of modern implementations is far different, particularly on low end systems such as Tomcat.

    Not to disparage Tomcat. Tomcat is a great piece of software. But for most of its use cases, the extra management capability simply is not necessary.

    Setting up your own thread pool (using the JDK provided facilities) and working with your own thread lifecycle model will likely see you successfully through whatever project you’re working on. It’s really not a big deal.

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

Sidebar

Related Questions

I have a web app I'm creating, where I need to allow the user
I am creating a web app for a business which includes several departments. I
At work we have a web app that we'll need to interface with another
I'm creating a web app using Spring 3 and would like to harness the
I am creating a music web app that streams MP3s that I have stored
i'm creating a web app that's running on an Advantage Database server, not my
I'm creating a web app with Django. Since I'm very familiar with Apache I
I'm creating a web app (locally, so security doesn't matter) in PHP where the
I am creating a web app which uses jQuery to authenticate: $.ajax({ url: /session/create?format=json,
I am working on creating a web app that will query event logs on

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.