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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:25:12+00:00 2026-05-26T13:25:12+00:00

I have a Java RESTful webservice that will be called about every 10 seconds

  • 0

I have a Java RESTful webservice that will be called about every 10 seconds by another process. If conditions are right, the webservice needs to perform a potentially extensive ETL process (say 10 – 20 seconds). However, we want to return to the calling application right away indicating the payload was delivered successfully to the web service.

Summary of Requirements:

  • Validate authentication and input parameters.
  • If Validation fails, return error in XML.
  • Start thread performing ETL process. Process will only proceed under certain conditions.
  • Return XML indicating payload delivered and validation of input passed.

I have coded this and it appears to run correctly. But it doesn’t seem right. The thread I created will potentially run longer than the main web service thread.

Anyone want to point me to a better way of doing this?

  • 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-26T13:25:13+00:00Added an answer on May 26, 2026 at 1:25 pm

    that is exactly the right way to do it. what “doesn’t seem right” about the solution?

    my only suggestion would be that you shouldn’t just launch threads willy-nilly. you should have some sort of shared ExecutorService managing these ETL process threads. that will give you visibility into what has been launched and is still running as well as the ability to limit/control the number of background processes (and potentially deal with any rogue executions).

    you also might want to generate some sort of “jobId” for the launched process and return that to the caller. then you could add a call to your api which a client could use to check on the status of a job.

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

Sidebar

Related Questions

I have to do a simple RESTful client for a webservice written in Java.
We're in the process of building an internal, Java-based RESTful web services application that
I have Java Map (out of Strings and Ints) objects that I want to
I already have Java code to display and process data from a database. I
I'm dipping my toes into Android development. I have a project that will interface
I have Java app that takes data from external app. Incoming JSONs are in
After three years on a RESTful Java/ExtJS application, I have taken over development of
I have successfully implemented a restful service that works with my own client. Now,
For now I have a slight idea about the differences between SOAP and RESTful
I am implementing a RESTful web service that currently handles JSON and needs 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.