ASF Bugzilla – Attachment 27760 Details for
Bug 46264
Shutting down tomcat with large number of contexts is slow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
make ContextConfig threadsafe
makeContextConfigThreadSafe.diff (text/plain), 1.08 KB, created by
Felix Schumacher
on 2011-10-11 14:49:21 UTC
(
hide
)
Description:
make ContextConfig threadsafe
Filename:
MIME Type:
Creator:
Felix Schumacher
Created:
2011-10-11 14:49:21 UTC
Size:
1.08 KB
patch
obsolete
>diff --git a/java/org/apache/catalina/startup/ContextConfig.java b/java/org/apache/catalina/startup/ContextConfig.java >index bb17406..8de9561 100644 >--- a/java/org/apache/catalina/startup/ContextConfig.java >+++ b/java/org/apache/catalina/startup/ContextConfig.java >@@ -129,7 +129,7 @@ public class ContextConfig > * The <code>Digester</code> we will use to process web application > * context files. > */ >- protected static Digester contextDigester = null; >+ protected Digester contextDigester = null; > > > /** >@@ -829,8 +829,13 @@ public class ContextConfig > // Called from StandardContext.init() > > if (contextDigester == null){ >- contextDigester = createContextDigester(); >- contextDigester.getParser(); >+ synchronized (this) { >+ if (contextDigester == null) { >+ Digester tmpDigester = createContextDigester(); >+ tmpDigester.getParser(); >+ contextDigester = tmpDigester; >+ } >+ } > } > > if (log.isDebugEnabled())
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 46264
:
22912
|
27755
|
27758
|
27759
| 27760 |
27761
|
27767
|
27769
|
27772
|
27846