cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: [RT] The API for the request object
Date Tue, 06 Jul 2004 18:02:51 GMT
Jeremy Quinn wrote:
> 
> On 6 Jul 2004, at 11:13, Sylvain Wallez wrote:
> 
>>> Now, the basic mechanism for this could be to scan all attribute 
>>> values of the request and find out if the value should be cleaned up 
>>> or not. This could be done by either testing for the usual suspects 
>>> from Avalon (Disposable, Recyclable) or by defining a new Cocoon 
>>> specific interface.
>>> But perhaps there is a better way?
>>>
>>
>> What about adding a list of ProcessingListeners to the object model, 
>> which can be augmented by the various components that participate in 
>> request handling, and is called at particular places such as:
>> - processing start (such listeners must be registered in the xconf),
>> - sitemap mount,
>> - end of pipeline building,
>> - start of pipeline execution (differs from the previous one as it may 
>> not be called if the result is cached)
>> - end of pipeline execution
>> - end of processing
>>
>> That would allow e.g. a flowscript to register a listener that closes 
>> a hibernate session once the processing is terminated, thus allowing 
>> the same session to be used in the view.
>>
> 
> I believe this is already possible with the JXTemplate callback hook:
> 
>     catch (return) {session.close ()}
> 
> though there does seem to be a lot of confusion about it and the syntax 
> is strange ;)
does it also work for cocoon.sendPage ? AFAIU sendPage does not produce 
a continuation so this code will not be executed.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project 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


Mime
View raw message