cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: Woody: managing persistence sessions
Date Wed, 05 Nov 2003 14:40:04 GMT

On Wednesday, November 5, 2003, at 01:06 PM, Reinhard Poetz wrote:

>> I am really impressed with the Cocoon Forms framework!!
>> And the continuation-lifecycle 'catch' events work well too!!
>> There is one more event that some people could conceivably want ....
>> but I do not know if it is possible .... "The Continuation has
>> completed".
>>
>> Many thanks guys!
>
> Sorry, but I haven't got what you mean with "The Continuation has
> completed".
> When is this event reached? Can you give a example (maybe using some
> code)?

This is what I am thinking about:

If you take this code snippet here:

   . . .
    // get the User
    form.load (user);
    session.close();
    form.showForm (formURI);
    session = factory.createSession ();
    form.save (user);
    // save the User
   . . .

The line "session.close();" in the sample above, could be replaced by 
this (obviously after the snippet):

	catch (break) {
		session.close();
	}

because it will be called just as a continuation is about to start

whereas the line "session = factory.createSession ();" does not have an 
equivalent handler that would trigger after all continuation handling 
has completed.

do you see what I mean?

regards Jerm


Mime
View raw message