On Nov 20, 2007 12:31 AM, Thiago H de Paula Figueiredo <[EMAIL PROTECTED]> wrote: > On Mon, 19 Nov 2007 16:34:46 -0200, lasitha <[EMAIL PROTECTED]> > wrote: > > HiberTapestry does not work like tapestry-hibernate*, just opening a > transaction when a transactional method is invoked. A method is > transactional if it is @Transactional (an annotation of HiberTapestry) and > it is declared in a service built by Tapestry-IoC. Therefore, in the > scenario described above by Lasitha, no service method would be invoked > and no changes to the edited object is propagated to the database. > > * As far as I can remember, tapestry-hibernate opens a session when the > request starts and commits it at the end of it. Am I right?
Yes. But my question pertains more to the span of the hibernate _session_ than to that of the transaction. A typical OSIV implementation keeps a single session open right until the end of a request so the view layer can access entities loaded in that request without having to worry about lazy-loading exceptions and such. If HiberTapestry doesn't keep a session open like this, then you're right: you won't run into this problem. But this then doesn't provide the benefits of an OSIV. If, otoh, it does keep a session open, does it flush the session at the end of the request? In previous versions of hibernate, just closing a session automatically triggered a flush. I will have to check whether this is still the case. Thanks for keeping up this thread - once i can look at your source i will bother you less :) lasitha. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]