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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:20:57+00:00 2026-05-11T06:20:57+00:00

I currently have a tomcat container — servlet running on it listening for requests.

  • 0

I currently have a tomcat container — servlet running on it listening for requests. I need the result of an HTTP request to be a submission to a job queue which will then be processed asynchronously. I want each ‘job’ to be persisted in a row in a DB for tracking and for recovery in case of failure. I’ve been doing a lot of reading. Here are my options (note I have to use open-source stuff for everything).

1) JMS — use ActiveMQ (but who is the consumer of the job in this case another servlet?)

2) Have my request create a row in the DB. Have a seperate servlet inside my Tomcat container that always runs — it Uses Quartz Scheduler or utilities provided in java.util.concurrent to continously process the rows as jobs (uses thread pooling).

I am leaning towards the latter because looking at the JMS documentation gives me a headache and while I know its a more robust solution I need to implement this relatively quickly. I’m not anticipating huge amounts of load in the early days of deploying this server in any case.

A lot of people say Spring might be good for either 1 or 2. However I’ve never used Spring and I wouldn’t even know how to start using it to solve this problem. Any pointers on how to dive in without having to re-write my entire project would be useful.

Otherwise if you could weigh in on option 1 or 2 that would also be useful.

Clarification: The asynchronous process would be to screen scrape a third-party web site, and send a message notification to the original requester. The third-party web site is a bit flaky and slow and thats why it will be handled as an asynchronous process (several retry attempts built in). I will also be pulling files from that site and storing them in S3.

  • 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. 2026-05-11T06:20:58+00:00Added an answer on May 11, 2026 at 6:20 am

    Your Quartz Job doesn’t need to be a Servlet! You can persist incoming Jobs in the DB and have Quartz started when your main Servlet starts up. The Quartz Job can be a simple POJO and check the DB for any jobs periodically.

    However, I would suggest to take a look at Spring. It’s not hard to learn and easy to setup within Tomcat. You can find a lot of good information in the Spring reference documentation. It has Quartz integration, which is much easier than doing it manually.

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

Sidebar

Related Questions

I have a legacy Java servlet that is currently running in a Tomcat container.
I have two web applications running in same Servlet container ( Tomcat ), A
Currently I have a web service running in a tomcat (http:// localhost:8080/myApp/getUsers ). My
I currently have a tomcat servlet 1 running under the ROOT: api1.myhost.com:8080/ I'm using
Currently to access my dynamic web project (running in a tomcat servlet container) I
I have a Tomcat instance running within our corp network. Currently users can access
I currently have a Tomcat + Apache HTTP server setting to serve my Java
I am running Eclipse Galileo with Tomcat 6.0.18. Currently, I have a working application
I have a servlet based webapp running on Tomcat 6 server. The URL scheme
I currently have one .war running on tomcat, I wonder if I put another

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.