cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: RequestLifecycle components
Date Wed, 22 Oct 2003 16:08:29 GMT
Carsten Ziegeler wrote:

> Unico Hommes wrote:
>>What about transactional components? I have a situation where I
>>use a GRL to wrap a session fa├žade type object and rely on
>>recycle() being called at the end of the request in order to
>>commit/rollback work done. How would I achieve this without GRL lifecycle?
> Good question! Actually, I don't know and I'm wondering if it
> is a good idea to rely on this behaviour of the component
> container. Hmm, don't know.

To be honest, I would say not.

> Ok, anyway, we could keep the GRL which can be modelled in
> fortress using a thread component (one component per thread),
> but skip the RLC which caused a lot of trouble to get it
> working and which might still cause us more trouble than
> it's worth.

What about a "listener" style approach.  When the request environment is
done with the request, any cleanup code can be encapsulated in "cleanup"

This would be accomplished by adding an event Queue (Excalibur Event package),
and we would add commands to the request shutdown queue.  When all is done,
we execute them.

We can easily do this without the need for statics.


"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin

View raw message