I have a servlet S which handles callbacks from a 3rd party site.
The callback invocations happen in a specific order. Thus, I need to queue them.
I propos
I second the comment that says managing your own thread pool is a bad idea.
Servlets are for handling HTTP requests. HTTP is a synchronous request/response protocol. The logic for how they're handled belongs somewhere else. That handler may be synchronous or asynchronous, but that should be up to the handler implementation. The servlet should decide which handler to defer to for a given response and that's it.
Even if you use Tomcat or a servlet/JSP engine, you can still use Spring, JMS, and MDPs by adding ActiveMQ to your Tomcat implementation.