[
http://jira.nuxeo.org/browse/NXP-3058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48783#action_48783
]
Alexandre Russel commented on NXP-3058:
---------------------------------------
According to the seam doc:
But these rules(EJB rules) only apply in the Seam component layer. What about
an exception that is uncaught and propagates out of the Seam component layer,
and out of the JSF layer? Well, it is always wrong to leave a dangling
transaction open, so Seam rolls back any active transaction when an exception
occurs and is uncaught in the Seam component layer.
http://docs.jboss.com/seam/2.0.3.CR1/reference/en-US/html/events.html#d0e5012
When the exception is thrown:
The rollback interceptors check it. Because it is an application exception it
doesn't rollback the transaction
The SeamPhaseListener see a transaction and commit (status from 0 to 6)
The exception filter sees the exception, but no transaction(status is 6) so do
nothing.
> makes thrown runtime exception rollback the transaction
> -------------------------------------------------------
>
> Key: NXP-3058
> URL: http://jira.nuxeo.org/browse/NXP-3058
> Project: Nuxeo Enterprise Platform
> Issue Type: Bug
> Reporter: Alexandre Russel
> Assignee: Alexandre Russel
> Priority: Critical
>
> In code called from a Seam bean I have:
> newProxy = session.publishDocument(docToPublish, sectionToPublishTo);
> //following code throws an exception
> newProxy.setProperty("dublincore", "title", "newName");
> session.saveDocument(newProxy);
> session.save();
> the saveDocument throws an exception because no such change is allowed on
> proxies.
> The proxy is still published when I would expect the transaction to be rolled
> back and so the proxy not published.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets