cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anathan...@apache.org
Subject svn commit: r498471 - /cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
Date Sun, 21 Jan 2007 22:35:15 GMT
Author: anathaniel
Date: Sun Jan 21 14:35:14 2007
New Revision: 498471

URL: http://svn.apache.org/viewvc?view=rev&rev=498471
Log:
Fix deadlock in caching pipeline when used in combination with include transformer.
fixes-bug="COCOON-1985" due-to="Ellis Pritchard"

Modified:
    cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java

Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java?view=diff&rev=498471&r1=498470&r2=498471
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
(original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
Sun Jan 21 14:35:14 2007
@@ -171,7 +171,8 @@
                     lock = transientStore.get(lockKey);
                 }
             }
-            if(lock != null) {
+            // Avoid deadlock with self (see JIRA COCOON-1985).
+            if(lock != null && lock != Thread.currentThread()) {
                 try {
                     // become owner of monitor
                     synchronized(lock) {
@@ -207,7 +208,7 @@
                         getLogger().debug("Lock already present in the store!");
                     }
                 } else {
-                    Object lock = new Object();
+                    Object lock = Thread.currentThread();
                     try {
                         transientStore.store(lockKey, lock);
                     } catch (IOException e) {



Mime
View raw message