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

  • Home
  • SEARCH
  • 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

Hello I have a confluence installation running on tomcat. In front of tomcat I
currently we have an application that is configured by using a datasource inside a
I currently trying to setup Amazon Load Balancer for Tomcat workers, but I faced
I have been trying to find answers to this question, and I'm currently baffled.
I have a task to show to the site admin a list of user
Basically i want my tomcat to run on PORT 80 how do i do
We've got webapps with servlets that make JDBC calls directly. We've mostly replaced the
I am not sure if this is a permissions problem, or an error in
I am trying to setup my application to use Spring and also an image
I'm working through the Java Ranch Cattle Drive online tutorials and got up to

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.