java - Can I re-use tomcat threads that are currently waiting or sleeping? -


i have following scenario in java web-application.

each request accepted application(tomcat-based) has wait at-least 2 minutes data processing. initial request in-turn creates thread-pool process data. while initial request thread waiting processing complete, can used take further incoming requests?

no. it's application server's business accept , handle incoming http connections - , can occupying 1 connection short time possible. doing on own totally pollute own code appserver duties , should not want kind of business.

the comments on question give great suggestions alternative solutions. long keep sitting on connection (or request/response pair) busy , not available appserver.

alternatively, load profile, might able increase number of concurrently handled requests - if they're really idle , waiting, might quick fix: can potentially handle lot of other requests while long-running requests waiting background processing. not think elegant, might quickest fix.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -