You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Colin Paul Adams <co...@colina.demon.co.uk> on 2004/07/06 11:26:48 UTC

Session timeouts

>>>>> "Colin" == Colin Paul Adams <co...@colina.demon.co.uk> writes:

>>>>> "Ugo" == Ugo Cei <ug...@apache.org> writes:
    Ugo> the user never submits the form, but just closes the browser,
    Ugo> walks away or surfs to some other website? The transaction is
    Ugo> never closed and the records are locked forever (unless you
    Ugo> implement some kind of timeout).

    Colin> That is what I was intending to do.

Except having now looked on the documentation for session support in
Cocoon, there does not appear to be any support for session timeouts.
Not can I see anything about transaction timeouts in JDO.
-- 
Colin Paul Adams
Preston Lancashire

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Session timeouts

Posted by Ralph Goers <Ra...@dslextreme.com>.
That is a funny way to put it. Cocoon doesn't provide anything regarding 
session listeners nor does it prevent you from doing so. In fact, it 
is  extremely easy.  I created a single "SessionData" class that is nothing 
more than a container for all my other session-based objects. This class 
registers itself as an HttpSessionListener.  When a timeout occurs it calls 
methods in the objects registered with it so that they can clean 
up.  Cocoon doesn't require any cleaning up so it isn't a problem.

You said below, "I would have expected coccon to make use of the 
sessionDestroyed method on this object". What object are you referring 
to?  AFAIK, all Cocoon requires is that it's Session-based objects be 
deleted at Session termination - which the container takes care of 
automatically.

Ralph

At 7/6/2004  08:54 AM, you wrote:

>But it is important to be able to take control when a session expires,
>so you can free up any resources in use (such as a database
>connection).
>The interface HttpSessionListener is available for objects to
>receive notification of session binding and unbinding.
>I would have expected coccon to make use of the sessionDestroyed
>method on this object to be able to pass control at session
>termination, but I cannot find any reference in the source code to
>HttpSessionListener so I conclude that it does not allow this.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Session timeouts

Posted by Colin Paul Adams <co...@colina.demon.co.uk>.
>>>>> "Ugo" == Ugo Cei <ug...@apache.org> writes:

    Ugo> Il giorno 06/lug/04, alle 11:26, Colin Paul Adams ha scritto:
    >> Except having now looked on the documentation for session
    >> support in Cocoon, there does not appear to be any support for
    >> session timeouts.

    Ugo> Session timeouts are the concern of the servlet container. It
    Ugo> should be configured somewhere in WEB-INF/web.xml, if I
    Ugo> remember correctly.

But it is important to be able to take control when a session expires,
so you can free up any resources in use (such as a database
connection).
The interface HttpSessionListener is available for objects to
receive notification of session binding and unbinding.
I would have expected coccon to make use of the sessionDestroyed
method on this object to be able to pass control at session
termination, but I cannot find any reference in the source code to
HttpSessionListener so I conclude that it does not allow this.

-- 
Colin Paul Adams
Preston Lancashire

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Session timeouts

Posted by Ugo Cei <ug...@apache.org>.
Il giorno 06/lug/04, alle 11:26, Colin Paul Adams ha scritto:

> Except having now looked on the documentation for session support in
> Cocoon, there does not appear to be any support for session timeouts.

Session timeouts are the concern of the servlet container. It should be 
configured somewhere in WEB-INF/web.xml, if I remember correctly.

-- 
Ugo Cei - http://beblogging.com/