We have a small text box with 512Mb of ram. We wanted to see how many threads we can create in Java in this box. To our surprise, we can\'t create many. Essentially the minimum
You don't necessarily need one thread per client session. If you look at the way that a J2EE (or JavaEE) server handles multiple connections it uses a mixture of strategies including concurrency, queuing and swapping. Usually you can configure the maximum number of live concurrent instances and idle time-out values at deployment time to tune the performance of your application.