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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:34:30+00:00 2026-06-10T21:34:30+00:00

How can I make an embedded Jetty instance single-threaded? I have tried server.setThreadPool(new QueuedThreadPool(1))

  • 0

How can I make an embedded Jetty instance single-threaded?

I have tried

server.setThreadPool(new QueuedThreadPool(1))

but it complains that there are not enough threads in the pool, and hangs. This still happens even if I use a SocketConnector instead of a NIO connector.

(The reason I want this is I’m trying to solve this problem – which I currently have a bounty on, by the way! – and Google’s LocalServiceTestHelper only seems to take effect in the current thread.)

  • 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-06-10T21:34:32+00:00Added an answer on June 10, 2026 at 9:34 pm

    The SocketConnector needs 2 threads – one to wait for connections, and one to service a connection. Other connectors may need even more, so use a SocketConnector.

    Also, you must ensure that each connection is closed on the client end before you make another connection – otherwise the server will keep it open for a while, in case any more HTTP requests are to be sent. Make sure you disable Keep-Alive.

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

Sidebar

Related Questions

I can make a single row IKImageBrowserView by setting the [imageBrowser setContentResizingMask:NSViewWidthSizable]; but in
Can someone tell me how I can make the following output? I have a
I want make RESTful services using embedded jetty with JAX-RS (either resteasy or jersey).
Problem I have an app where one can make pledges against a gift. Once
I can make my program write a .dat file with an array of Node
How can make a link within a facebox window that redirects it to another
I can make a variable's name from two variables' value: $a = 'tea'; $b
I can make a log in for easily, so that's not the problem. What
I can make batch or vbs file on windows and run. this can automate
Can someone tell me how I can make a table be 100% height in

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.