Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3072

Add a test to verify the behaviour of LRA.Type.REQUIRES_NEW combined with LRA.delayClose

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 5.9.7.Final
    • 5.9.0.Final
    • LRA, Testing
    • None

      Add a test that verifies the correct behaviour when a method is annotated with both REQUIRES_NEW and delayClose, ie something like:

          @PUT
          @Path(ActivityController.ACCEPT_WORK)
          @LRA(value = LRA.Type.REQUIRES_NEW, delayClose = true)
          public Response doInNewLRA( ....) {...}
      

      The expected behaviour is:

              /**
               * If called outside a LRA context a new LRA will be created for the
               * the duration of the method call and when the call completes it will
               * be closed (this behaviour can be overridden using the
               * {@link LRA#delayClose} attribute).
               *
               * If called inside a LRA context it will be suspended and a new LRA
               * context will be created for the duration of the call. When the method
               * finishes this new LRA will be closed and the original context will be
               * resumed. This behaviour can be overridden using the
               * {@link LRA#delayClose} attribute) in which case the original LRA
               * remains suspended and the new LRA becomes the active one and only
               * when that one is terminated will the original context be resumed.
               */
              REQUIRES_NEW,
      

              rhn-engineering-mmusgrov Michael Musgrove
              rhn-engineering-mmusgrov Michael Musgrove
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: