Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2061

Add a non-recursive mechanism to OperationContext

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • 7.1.0.Beta1
    • 7.1.0.Alpha1
    • Domain Management
    • None

    Description

      Allow OperationStepHandlers to register a callback with the OperationContext when calling complete step, instead of waiting for a return value.

      public void completeStep(OperationRollbackHandler rollbackHandler);

      public interface OperationRollbackHandler {
      public void handleOperationRollback();
      }

      Potentially handleOperationRollback could take the OperationContext and ModelNode as params, although it's tempting to rely on the OSH to cache that. Presumably the typical implementation would be an anonymous inner class.

      The point of all this is the OperationContextImpl would track these registered OperationRollbackHandlers and invoke them at the appropriate point on the return path from executing all the steps in the operation. For each OSH that uses this API some recursion would be avoided.

      Attachments

        Issue Links

          Activity

            People

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: