static void buildTransformation(ModelVersion version, ResourceTransformationDescriptionBuilder parent) {
ResourceTransformationDescriptionBuilder builder = parent.addChildResource(PATH);
if (InfinispanModel.VERSION_3_0_0.requiresTransformation(version)) {
// We need to reject if we cannot determine the underlying stack via the jgroups subsystem
Rejecter stackRejecter = new Rejecter() {
@Override
public boolean reject(PathAddress address, String name, ModelNode value, ModelNode model, TransformationContext context) {
if (value.isDefined()) return false;
PathAddress rootAddress = address.subAddress(0, address.size() - 3);
PathAddress subsystemAddress = rootAddress.append(JGroupsSubsystemResourceDefinition.PATH);