Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3955

Non-persistent overlay gets persisted later

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 8.1.0.Final, 9.0.0.Alpha1
    • Management
    • None

    Description

      In an add handler at startup, I have code that creates a non-persistent overlay like this:

      private void addOverlay(OperationContext context) throws OperationFailedException {
              PathAddress overlayAddress = PathAddress.pathAddress(PathElement.pathElement(DEPLOYMENT_OVERLAY, overlayName));
      
              ModelNode addOp = Util.createOperation(ADD, overlayAddress);
              addOp.get(PERSISTENT).set(false);        
              context.addStep(addOp, getAddHandler(context, overlayAddress), OperationContext.Stage.MODEL);
          }
      
      private OperationStepHandler getAddHandler(OperationContext context, PathAddress address) {
              ImmutableManagementResourceRegistration rootResourceRegistration = context.getRootResourceRegistration();
              return rootResourceRegistration.getOperationHandler(address, ADD);
          }
      

      addOverlay() is called from the populateModel() method of my Add Handler. This works fine and creates the overlay without persisting to standalone.xml.

      However, if I deploy any WAR then the overlay is written out to standalone.xml.

      I can get you some better test code if you need it later.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            ssilvert@redhat.com Stan Silvert
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: