tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Luehe <Jan.Lu...@Sun.COM>
Subject [5.0] No sessions purged in Context with backgroundProcessorDelay > 0?
Date Wed, 15 Oct 2003 16:16:27 GMT
I may be totally wrong here, but it seems that if the
backgroundProcessorDelay property on a StandardContext is set to
something greater than zero (default is -1, inherited from
ContainerBase), the context's sessions are never purged.

This is because in ContainerBase$ContainerBackgroundProcessor,
processChildren() is implemented as follows:

     for (int i = 0; i < children.length; i++) {
         if (children[i].getBackgroundProcessorDelay() <= 0) {
             processChildren(children[i], cl);

So when invoked from the ContainerBackgroundProcessor of a
StandardHost, only the sessions of those StandardContexts with a
backgroundProcessorDelay <=0 will get purged.

I think the assumption is that if a StandardContext has a
backgroundProcessorDelay > 0, it would have its own
ContainerBackgroundProcessor spawn at startup. However, unlike
StandardEngine/Host/Wrapper, StandardContext.start() does not invoke
super.start(), and therefore a ContainerBackgroundProcessor is never
created for a StandardContext.

Am I missing something here?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message