ASF Bugzilla – Attachment 27230 Details for
Bug 51445
Tomcat 7 SingleThreadModel Problem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
init every servlet if it is a SingleThreadMode servlet
init_singleThreadModel.diff (text/plain), 1.42 KB, created by
Felix Schumacher
on 2011-06-30 10:39:50 UTC
(
hide
)
Description:
init every servlet if it is a SingleThreadMode servlet
Filename:
MIME Type:
Creator:
Felix Schumacher
Created:
2011-06-30 10:39:50 UTC
Size:
1.42 KB
patch
obsolete
>diff --git a/java/org/apache/catalina/core/StandardWrapper.java b/java/org/apache/catalina/core/StandardWrapper.java >index e30149f..0f1fb23 100644 >--- a/java/org/apache/catalina/core/StandardWrapper.java >+++ b/java/org/apache/catalina/core/StandardWrapper.java >@@ -1115,10 +1115,9 @@ public class StandardWrapper extends ContainerBase > > classLoadTime=(int) (System.currentTimeMillis() -t1); > >- initServlet(servlet); >- >- // Register our newly initialized instance > singleThreadModel = servlet instanceof SingleThreadModel; >+ initServlet(servlet, singleThreadModel); >+ // Register our newly initialized instance > if (singleThreadModel) { > if (instancePool == null) > instancePool = new Stack<Servlet>(); >@@ -1182,11 +1181,15 @@ public class StandardWrapper extends ContainerBase > new ServletSecurityElement(secAnnotation)); > } > } >+ >+ private void initServlet(Servlet servlet) throws ServletException { >+ initServlet(servlet, false); >+ } > >- private synchronized void initServlet(Servlet servlet) >+ private synchronized void initServlet(Servlet servlet, boolean force) > throws ServletException { > >- if (instanceInitialized) return; >+ if (instanceInitialized && !force) return; > > // Call the initialization method of this servlet > try {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51445
: 27230