public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
final ModelNode result = new ModelNode();
final PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement());
final ModelNode subModel = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS));
result.add(JGroupsSubsystemAdd.createOperation(rootAddress.toModelNode(), subModel));
if (subModel.hasDefined(ModelKeys.STACK)) {
for(final Property stack : subModel.get(ModelKeys.STACK).asPropertyList()) {
final ModelNode address = rootAddress.toModelNode();
address.add(ModelKeys.STACK, stack.getName());