Author: lgawron
Date: Fri Dec  3 05:02:16 2004
New Revision: 109669

URL: http://svn.apache.org/viewcvs?view=rev&rev=109669
Log:
fix 32511: allow ContinuationsManagerImpl run in compatibility mode and return 
WebContinuations for improper interpreter.

Modified:
   
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java
   cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf

Modified: 
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java
Url: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java?view=diff&rev=109669&p1=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java&r1=109668&p2=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java&r2=109669
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java
       (original)
+++ 
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java
       Fri Dec  3 05:02:16 2004
@@ -96,6 +96,7 @@
     private ValueInstrument expirationsSize;
     private CounterInstrument continuationsCreated;
     private CounterInstrument continuationsInvalidated;
+    private boolean isContinuationSharingBugCompatible;
 
     private ServiceManager serviceManager;
 
@@ -122,6 +123,7 @@
 
     public void configure(Configuration config) {
         this.defaultTimeToLive = config.getAttributeAsInteger("time-to-live", 
(3600 * 1000));
+        this.isContinuationSharingBugCompatible = 
config.getAttributeAsBoolean("continuation-sharing-bug-compatible", false);
 
         final Configuration expireConf = config.getChild("expirations-check");
         final long initialDelay = expireConf.getChild("offset", 
true).getValueAsLong(180000);
@@ -208,7 +210,7 @@
                                  + kont.getInterpreterId() + ", looked up for: 
" 
                                  + interpreterId);
             }
-            return interpreterMatches ? kont : null;
+            return interpreterMatches || isContinuationSharingBugCompatible ? 
kont : null;
         }
         return null;
     }

Modified: cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf
Url: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf?view=diff&rev=109669&p1=cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf&r1=109668&p2=cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf&r2=109669
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf        
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/webapp/WEB-INF/cocoon.xconf        Fri Dec 
 3 05:02:16 2004
@@ -106,6 +106,15 @@
       | in miliseconds using the "time-to-live" attribute of
       | the <continuations-manager> element.
       |
+      | If your site is sharing continuations between sitemaps you
+      | should refactor your application to keep a continuation bound to
+      | a single sitemap. The log will contain warnings which indicate
+      | where a continuation from a different sitemap is used.
+      |
+      | When you cannot do the refactoring in one blow you can turn on
+      | compatibility with shared continuations by setting the
+      | "continuation-sharing-bug-compatible" attribute to "true".
+      |
       | The <expirations-check> element specifies different policies for
       | expiring continuations. Currently only the "periodic" type is
       | supported.

Reply via email to