static TransformationDescription buildTransformers(ModelVersion version) {
    ResourceTransformationDescriptionBuilder builder =
        TransformationDescriptionBuilder.Factory.createSubsystemInstance();

    if (JGroupsModel.VERSION_3_0_0.requiresTransformation(version)) {
      builder
          .getAttributeBuilder()
          .setDiscard(DiscardAttributeChecker.UNDEFINED, Attribute.DEFAULT_CHANNEL.getDefinition())
          .addRejectCheck(RejectAttributeChecker.DEFINED, Attribute.DEFAULT_CHANNEL.getDefinition())
          .addRejectCheck(RejectAttributeChecker.UNDEFINED, Attribute.DEFAULT_STACK.getDefinition())
          .end();

      builder.rejectChildResource(ChannelResourceDefinition.WILDCARD_PATH);
    } else {
      ChannelResourceDefinition.buildTransformation(version, builder);
    }

    StackResourceDefinition.buildTransformation(version, builder);

    return builder.build();
  }
  private void parseStack(
      XMLExtendedStreamReader reader,
      PathAddress subsystemAddress,
      Map<PathAddress, ModelNode> operations)
      throws XMLStreamException {
    String name = require(reader, XMLAttribute.NAME);
    PathAddress address = subsystemAddress.append(StackResourceDefinition.pathElement(name));
    ModelNode operation = Util.createAddOperation(address);
    operations.put(address, operation);

    while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
      XMLElement element = XMLElement.forName(reader.getLocalName());
      switch (element) {
        case TRANSPORT:
          {
            this.parseTransport(reader, address, operations);
            break;
          }
        case PROTOCOL:
          {
            this.parseProtocol(reader, address, operations);
            break;
          }
        case RELAY:
          {
            if (this.schema.since(JGroupsSchema.VERSION_2_0)) {
              this.parseRelay(reader, address, operations);
              break;
            }
          }
        default:
          {
            throw ParseUtils.unexpectedElement(reader);
          }
      }
    }
  }