On Mon, 19 Nov 2007 16:34:46 -0200, lasitha <[EMAIL PROTECTED]>
wrote:
Let me describe the problem in a little more detail. Assuming a
typical OSIV setup, consider the following sequence of events:
1. A form is submitted.
2. The entity that backs the form is retrieved from the db in
onActivate() or onPrepare().
3. The first set of validations pass and the entity's fields are
populated by tapestry.
4. Our onValidate() method finds some problem and records errors on
the validation tracker.
5. Tapestry redirects back to the same page so the user can correct
their inputs.
6. The request ends and the active session is flushed.
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?
--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]