[jbossseam-issues] [JBoss JIRA] Assigned: (JBSEAM-2970) In POJO mode, seam 2.0.2 performs a commit on the transaction even if the transaction si marked for rollback
Pete Muir (JIRA)
jira-events at lists.jboss.org
Sun May 11 08:53:21 EDT 2008
[ http://jira.jboss.com/jira/browse/JBSEAM-2970?page=all ]
Pete Muir reassigned JBSEAM-2970:
---------------------------------
Assignee: Pete Muir
> In POJO mode, seam 2.0.2 performs a commit on the transaction even if the transaction si marked for rollback
> ------------------------------------------------------------------------------------------------------------
>
> Key: JBSEAM-2970
> URL: http://jira.jboss.com/jira/browse/JBSEAM-2970
> Project: Seam
> Issue Type: Bug
> Affects Versions: 2.0.2.CR2
> Reporter: Denis Forveille
> Assigned To: Pete Muir
> Fix For: 2.1.0.BETA1, 2.0.2.GA
>
>
> The logic for performing the commit on a transaction should take into account that the transaction is marked for rollback or not.
> In Work.java, the could should be:
> T result = work();
> if (begin) {
> if (Transaction.instance().isMarkedRollback()) {
> log.debug("transaction isMarkedRollback. rolling back transaction");
> userTransaction.rollback();
> } else {
> log.debug("committing transaction");
> userTransaction.commit();
> }
> }
> return result;
> In the current code, the call to userTransaction.commit() is attempted even if Transaction.instance().isMarkedRollback() is true! This is the case if we call Transaction.instance().setRollbackOnly() in a method annoted with @Transactional
> See also the "TODO" marker in the code of this class
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list