Source:
static void registerTransformers120(ResourceTransformationDescriptionBuilder parentBuilder) { ResourceTransformationDescriptionBuilder builder = parentBuilder.addChildResource(PATH_DATASOURCE); builder.getAttributeBuilder() .setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(new ModelNode(false)), CONNECTABLE) .setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(false, false, new ModelNode(true)), STATISTICS_ENABLED) .setDiscard(DiscardAttributeChecker.UNDEFINED, ENLISTMENT_TRACE, MCP) .addRejectCheck(RejectAttributeChecker.DEFINED, ENLISTMENT_TRACE, MCP) .addRejectCheck(new RejectAttributeChecker.DefaultRejectAttributeChecker() { @Override public String getRejectionLogMessage(Map<String, ModelNode> attributes) { return ConnectorLogger.ROOT_LOGGER.rejectAttributesMustBeTrue(attributes.keySet()); } @Override protected boolean rejectAttribute(PathAddress address, String attributeName, ModelNode attributeValue, TransformationContext context) { return !attributeValue.isDefined() || !attributeValue.asString().equals("true"); } }, STATISTICS_ENABLED) .setDiscard(new DiscardAttributeChecker.DefaultDiscardAttributeChecker() { @Override protected boolean isValueDiscardable(PathAddress address, String attributeName, ModelNode attributeValue, TransformationContext context) { return attributeValue.equals(new ModelNode(false)); } }, TRACKING) .addRejectCheck(RejectAttributeChecker.DEFINED, TRACKING) .addRejectCheck(RejectAttributeChecker.SIMPLE_EXPRESSIONS, ENABLED).end() .addOperationTransformationOverride(DATASOURCE_ENABLE.getName()) .end() .addOperationTransformationOverride(DATASOURCE_DISABLE.getName()) .end(); }

Target:
static void registerTransformers120(ResourceTransformationDescriptionBuilder parentBuilder) { ResourceTransformationDescriptionBuilder builder = parentBuilder.addChildResource(PATH_DATASOURCE); builder.getAttributeBuilder() .setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(new ModelNode(false)), CONNECTABLE) .setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(false, false, new ModelNode(true)), STATISTICS_ENABLED) .setDiscard(DiscardAttributeChecker.UNDEFINED, ENLISTMENT_TRACE) .setDiscard(new DiscardAttributeChecker.DefaultDiscardAttributeChecker() { @Override protected boolean isValueDiscardable(PathAddress address, String attributeName, ModelNode attributeValue, TransformationContext context) { return attributeValue.equals(new ModelNode("org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool")); } }, MCP) .addRejectCheck(RejectAttributeChecker.DEFINED, ENLISTMENT_TRACE) .addRejectCheck(RejectAttributeChecker.ALL, MCP) .addRejectCheck(new RejectAttributeChecker.DefaultRejectAttributeChecker() { @Override public String getRejectionLogMessage(Map<String, ModelNode> attributes) { return ConnectorLogger.ROOT_LOGGER.rejectAttributesMustBeTrue(attributes.keySet()); } @Override protected boolean rejectAttribute(PathAddress address, String attributeName, ModelNode attributeValue, TransformationContext context) { return !attributeValue.isDefined() || !attributeValue.asString().equals("true"); } }, STATISTICS_ENABLED) .setDiscard(new DiscardAttributeChecker.DefaultDiscardAttributeChecker() { @Override protected boolean isValueDiscardable(PathAddress address, String attributeName, ModelNode attributeValue, TransformationContext context) { return attributeValue.equals(new ModelNode(false)); } }, TRACKING) .addRejectCheck(RejectAttributeChecker.DEFINED, TRACKING) .addRejectCheck(RejectAttributeChecker.SIMPLE_EXPRESSIONS, ENABLED).end() .addOperationTransformationOverride(DATASOURCE_ENABLE.getName()) .end() .addOperationTransformationOverride(DATASOURCE_DISABLE.getName()) .end(); }