我有一个关于Tomcat线程创建的基本问题。每个浏览器实例是在单个线程上运行还是会生成多个线程来处理单个浏览器实例请求?
在代码中,我引用了当前线程并调用了activecount方法,它显示20,这表示有20个活动线程。所以我怀疑这个值是从哪里配置的。是否有任何参数可以设置每个活动线程数?
while (iter.hasNext()) {
GrammarSection agrammarSection= null;
try {
agrammarSection = (GrammarSection) iter.next();
} catch (Exception e) {
System.out.println("DDD if it come in exception "+Thread.currentThread());
System.out.println("DDD if it come in exception "+Thread.activeCount()); //IT PRINTS 20