0

I have created a jetty server where in handler class, i am passing entire request to the Thread and submitting the thread to Threadpool for later execution. The Result is as :- For first request it is working correctly as per expectation.

From second request onwards, the request object becomes null in run() method but not in the constructor.

In the handler method, if i am doing the Thread.sleep() with any non negative time value then it is working correctly. even with time = 0 milisecond until the load becomes too high.

Is there any reason related to multithreaded execution environment ??

Mahesh Gupta
  • 2,688
  • 9
  • 30
  • 46
  • Pretty hard to tell without some sample code. Also, doesn't Jetty already provide thread pooling for HTTP connections? Why do you need to do your own thread pooling? – Alex Apr 09 '12 at 16:29
  • It does provide. It was just part of some experiment that i was trying to do to see if Jetty Application Server can be made even more efficient. – Mahesh Gupta Apr 09 '12 at 16:57
  • see the async continuations mechanisms of jetty (jetty-continuations), or look to jetty8 and servlet 3.0 for async support in servlets. that is the path to improving performance, not a bespoke mechanism like this – jesse mcconnell Apr 09 '12 at 17:04

0 Answers0