log.debug("Allocating non-STM instance");
instance = loadServlet();
- // For non-STM, increment here to prevent a race
- // condition with unload. Bug 43683, test case #3
- if (!singleThreadModel) {
+ if (singleThreadModel) {
+ // No need to lock pool since until an instance
+ // is created, no threads will get past this
+ // point
+ instancePool.push(instance);
+ nInstances++;
+ } else {
+ // For non-STM, increment here to prevent a race
+ // condition with unload. Bug 43683, test case
+ // #3
newInstance = true;
countAllocated.incrementAndGet();
}
In launcher for embedded Tomcat: do not change <code>catalina.home</code>
system property if it had a value. (kkolinko)
</fix>
+ <fix>
+ When using Servlets that implement the SingleThreadModel interface, add
+ the single instance created to the pool when it is determined that a
+ pool of servlets is required rather than throwing it away. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">