cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <kschnei...@gmail.com>
Subject Re: Continuation Time-To-Live Config Not Being Honored
Date Fri, 07 Oct 2005 03:56:12 GMT
I work with Dan and here's the rest of the story:

We ran into severe enough problems using flowscript on WebLogic 8.1
(Rhino issues, really), that we had to switch to Java flow. As we've
gone down that road, we've come to the realization that all of our
continuations seem to have a time to live of ten minutes, regardless
of how we configure the <continuations-manager> element in
cocoon.xconf. As it turns out, JavaInterpreter uses a hard-coded,
non-configurable value of 600000 for continuation time to live. Have
we missed anything with regard to being able to configure that aspect
of JavaInterpreter?

During our investigation of the time to live issue, we also came
across some concurrency issues with ContinuationsManagerImpl. This
class uses the following to store/manage continuations:

protected SortedSet expirations =
Collections.synchronizedSortedSet(new TreeSet());

There are a couple of places where that collection is iterated by doing:

Iterator i = expirations.iterator();
while (...) {
  // use i
}

This really should be changed to something like this:

synchronized(expirations) {
  Iterator i = expirations.iterator();
  while (...) {
    // use i
  }
}

This advice is contained within the Javadoc for
Collections.synchronizedSortedSet.

http://java.sun.com/j2se/1.3/docs/api/java/util/Collections.html#synchronizedSortedSet(java.util.SortedSet)

Some other references worth reading:

http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html#remove()

http://java.sun.com/j2se/1.3/docs/api/java/util/ConcurrentModificationException.html

Having said that, it seems like someone would have been screaming by
now about continuation management being horribly broken. So, is Java
flow just not being used, or used under such low levels of concurrency
that the problem hasn't surfaced yet? Or is our analysis of the code
just incorrect?

Thanks for any additional insight.

On 10/6/05, Leszek Gawron <lgawron@mobilebox.pl> wrote:
> Daniel Curran wrote:
> > After experiencing some interesting behavior with Invalid Continuation
> > Errors I have performed some tests and have found that no matter what I
> > set the time-to-live value to in cocoon.xconf the continuations always
> > expire after 10 minutes. Is the time-to-live attribute of the
> > continuations-manager not being honored? Where is the default value of
> > 10 minutes being set?
> Thanks for reporting. I'll check that first thing in the morning.
>
> --
> Leszek Gawron                                      lgawron@mobilebox.pl
> IT Manager                                         MobileBox sp. z o.o.
> +48 (61) 855 06 67                              http://www.mobilebox.pl
> mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65


--
Kris Schneider <mailto:kschneider@gmail.com>

Mime
View raw message