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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to