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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:02:19+00:00 2026-05-20T02:02:19+00:00

I am writing a VXML application which accepts an incoming SIP voice call and

  • 0

I am writing a VXML application which accepts an incoming SIP voice call and then polls a web service on a Java application running on a Tomcat instance on the same host machine for incoming voice requests (eg. play an audio prompt or collect some digits) from a separate channel. These voice requests are received via a separate WS interface and cached for the VXML sessions to collect. The voice requests may be received anywhere from 0.5s to 30+ seconds after the call is accepted.

Logically, the VXML sessions should poll periodically for new requests and the Java application in Tomcat return a non-blocking response indicating if any requests have been received. However an additional constraint I have is that the CPU cost of making a web service call from the VXML interpreter is quite high, so repeating this regularly for large volumes of simultaneous calls will noticably impact system capacity.

A preferred approach would be to have the web application block the polls from the VXML application until a voice service request arrives in the cache (with a timeout of eg. 5 or 10s). However, I understand using Thread.sleep on servlet threads for long periods of time is a bad idea at the best of times, so I’m looking for an alternative to achieving this.

This application needs to support large volumes of simultaneous sessions on the server (expecting up to 1000 VXML sessions on planned hardware), so just increasing the thread count on Tomcat would not be acceptable.

Is there a way I can have Tomcat sideline the request for a period of time while freeing up the servlet thread for other requests? Per chance, is Tomcat smart enough to do this simply when I use Thread.sleep? 🙂

Thanks,
fb

  • 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-20T02:02:19+00:00Added an answer on May 20, 2026 at 2:02 am

    Long-running requests and non-blocking I/O in Java is generally referred to as “Comet”. Tomcat 6 supports this in a proprietary way, and it’s incorporated into the Servlet 3.0 spec.

    See this article to learn about how to do both.

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

Sidebar

Related Questions

Writing to a file is not working after hosting the web application, whereas they
Writing a .NET DLL how do I find Application.ProductName ? EDIT: Obviously, importing Windows.Forms
Writing my first C# application...never touched the language before and not much of a
Writing a client application that sends images to a server via a webservice. As
When writing apps with asp.net, which I do more of than vb.net apps, I
Writing a lexer of .java source files in Java. I have a stream of
Writing an iPhone app in which I want to save the user the grief
Writing a program in which I need to split strings from a struct linked
Writing a code that does the following: Adds a mouse listener to a web-page
Writing a small HTML web page with some very simple Javascript in it, I

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.