tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Adams (JIRA)" <...@tapestry.apache.org>
Subject [jira] Commented: (TAPESTRY-2247) Don't commit the transaction automatically at the end of the request
Date Sun, 09 Mar 2008 22:35:46 GMT

    [ https://issues.apache.org/jira/browse/TAPESTRY-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576828#action_12576828

Dan Adams commented on TAPESTRY-2247:

In T4 we had commits on by default for a while and it ended up causing some weirdness in our
CMS projects; if you (or anything else) made a change to an entity then the changes could
be persisted without you knowing. Let's say you had an add/edit page where the entity was
the context. If you change some fields and then submit but some server-side validaton fails
then the changes to the entity will be committed even though the user hasn't succesfully submit
the form yet. So I would definitely want it to only save the changes once all the validation
goes through. Another use case is if you have an add/edit page where the entity is persisted
(normally) so that between screens it's not in the hibernate session. In this instance you
actually have to do an explicity call to save() because the entity won't be attached to the
session so it won't get caught in the automatic commit. Perhaps the behavior could be configurable
with a symbol.

> Don't commit the transaction automatically at the end of the request
> --------------------------------------------------------------------
>                 Key: TAPESTRY-2247
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2247
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-hibernate
>    Affects Versions: 5.0.10
>            Reporter: Dan Adams
>            Assignee: Dan Adams
> On thread cleanup, the Session should be flushed not committed. If people want to commit
changes they should explicitly do so but having the transaction committed automatically can
lead to some very mysterious changing of the data. In my experience, having the transaction
committed automatically does more harm than good.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org

View raw message