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

RaOperationUtil cannot handle unusual address formats

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: 8.1.0.Final
    • Fix Version/s: 9.0.0.Alpha1
    • Component/s: JCA
    • Labels:
      None

      Description

      RaOperationUtil is using a very unorthodox method of reading the address of the operation:

      final List<ModelNode> address = operation.get(ModelDescriptionConstants.ADDRESS).asList();
      final String id = address.get(address.size()-1).get(0).asString();

      The issue is the ModelNode returned by "address.get(address.size()-1)".

      When you use the CLI, the ModelNode is of ModelType.PROPERTY.

      To create a ModelNode of ModelType.PROPERTY using JSON syntax is difficult. (TBH I'm not sure how to do it.) The syntax in a typical curl command results in a node of ModelType.OBJECT.

      "address":[{"subsystem":"resource-adapters"},{"resource-adapter":"my-adapter"}]
      

      That get(0) call fails on ModelType.OBJECT. It's quite the quirk that it works for ModelType.PROPERTY.

      I'll replace that logic with standard stuff using PathAddress.

        Attachments

          Activity

            People

            Assignee:
            brian.stansberry Brian Stansberry
            Reporter:
            brian.stansberry Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: