Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1452

Throwing an exception (for -SNAPSHOT) does not abort the transaction.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: Core
    • Labels:
      None

      Description

      This relates to the earlier work in this iteration (1.13.0-SNAPSHOT) for the refactoring for interaction contexts.

      The responsibility for aborting the xactn in the case of an exception used to be performed by the transaction facet decorators. When they were removed, equivalent functionality was not put in its place.

      The net result being, throwing an exception still resulted in changes to objects being persisted.

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit dba0d51eb79488319e1dd1e9fe5029e0b1f39eef in isis's branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=dba0d51 ]

        ISIS-1452: reinstates logic to abort transaction if an exception is thrown.

        Previously (1.12.x) this was done using transaction facet decorators, but the work done under ISIS-1291 and others for this release removed those classes, without moving the responsibility elsewhere.

        This commit reintroduces the handling, with the ActionInvocationFacet and PropertySetterOrClearFacet using the looked-up PersistenceSessionServiceInternal to executeWithinTransaction; this is basically the same place in the call stack that the decorator facets would have been.

        The *Default impl of this - as used in runtime - delegates to the IsisTransactionManager#executeWithinTransaction(...).

        Show
        jira-bot ASF subversion and git services added a comment - Commit dba0d51eb79488319e1dd1e9fe5029e0b1f39eef in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=dba0d51 ] ISIS-1452 : reinstates logic to abort transaction if an exception is thrown. Previously (1.12.x) this was done using transaction facet decorators, but the work done under ISIS-1291 and others for this release removed those classes, without moving the responsibility elsewhere. This commit reintroduces the handling, with the ActionInvocationFacet and PropertySetterOrClearFacet using the looked-up PersistenceSessionServiceInternal to executeWithinTransaction; this is basically the same place in the call stack that the decorator facets would have been. The *Default impl of this - as used in runtime - delegates to the IsisTransactionManager#executeWithinTransaction(...).

          People

          • Assignee:
            danhaywood Dan Haywood
            Reporter:
            danhaywood Dan Haywood
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development