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 Tue, 04 Nov 2003 19:52:11 GMT

On Tuesday, November 4, 2003, at 01:43 PM, Reinhard Poetz wrote:

>    catch (break) {
         //   a continuation has been started
>    }
>    catch (continue) {
         //   a continuation has been resumed
>    }
> }
>
> IIRC catch(break) is must be used as "top-level" statement

I think this is why they did not work before

> (... but this is only a guess - never tried catch(continue) but
> catch(break)
> works for me.)

They both work for me too, so does :

catch (return) {
	// the page has finished rendering
}

So I have very fine-grained control over the session management :)

What I am not sure about now, is whether the values of widgets on the 
Form are bound to the Bean via object references, or if they are 
independent copies.

If they are copies, and the Bean does not get touched during the 
SendPageAndWait/Validate cycle then all one should need to do to manage 
the HibernateSession is this:

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

If I need to make a 'browser' of 'lazy-initialised' relationships then 
I would be using JXTemplate rather than Woody, with a dynamic model, 
and I still have enough control to manage the Session with these 
call-back handlers. Excellent!

Thanks for your help.

regards Jeremy


Mime
View raw message