Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add transformers to ejb3 subsystem

  • Loading branch information...
commit 45477e7b6edf0d8cc36bf3db4a477a29ac4b5829 1 parent 4458ce9
 Brian Stansberry authored January 08, 2013 kabir committed January 09, 2013

Showing 22 changed files with 938 additions and 172 deletions. Show diff stats Hide diff stats

  1. 9  controller/src/main/java/org/jboss/as/controller/ControllerLogger.java
  2. 33  controller/src/main/java/org/jboss/as/controller/ControllerMessages.java
  3. 40  ...arr; controller/src/main/java/org/jboss/as/controller/transform}/AddNameFromAddressResourceTransformer.java
  4. 257  controller/src/main/java/org/jboss/as/controller/transform/DiscardUndefinedAttributesTransformer.java
  5. 1  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/CacheFactoryResourceDefinition.java
  6. 15  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/ChannelCreationOptionResource.java
  7. 17  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/ClusterPassivationStoreResourceDefinition.java
  8. 65  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3Extension.java
  9. 13  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3RemoteResourceDefinition.java
  10. 94  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3SubsystemRootResourceDefinition.java
  11. 12  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/FilePassivationStoreResourceDefinition.java
  12. 16  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/PassivationStoreResourceDefinition.java
  13. 17  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/StrictMaxPoolResourceDefinition.java
  14. 36  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/TimerServiceResourceDefinition.java
  15. 165  ejb3/src/test/java/org/jboss/as/ejb3/subsystem/Ejb3SubsystemUnitTestCase.java
  16. 58  ejb3/src/test/java/org/jboss/as/ejb3/subsystem/SubsystemParsingUnitTestCase.java
  17. 5  ejb3/src/test/resources/org/jboss/as/ejb3/subsystem/subsystem.xml
  18. 54  ejb3/src/test/resources/org/jboss/as/ejb3/subsystem/transform_1_1_0.xml
  19. 2  host-controller/src/main/java/org/jboss/as/domain/controller/transformers/DomainTransformers.java
  20. 156  model-test/src/main/java/org/jboss/as/model/test/FailedOperationTransformationConfig.java
  21. 38  model-test/src/main/java/org/jboss/as/model/test/ModelTestUtils.java
  22. 7  subsystem-test/src/main/java/org/jboss/as/subsystem/test/KnownVersions.java
9  controller/src/main/java/org/jboss/as/controller/ControllerLogger.java
@@ -444,4 +444,13 @@
444 444
     @LogMessage(level = WARN)
445 445
     @Message(id = 13402, value = "Transforming resource %s for host controller '%s' to subsystem '%s' model version '%s' -- attributes %s do not support expressions in that model version and this resource will need to be ignored on that host.")
446 446
     void rejectExpressionSubsystemModelResourceTransformerFoundExpressions(PathAddress pathAddress, String legacyHostName, String subsystem, ModelVersion modelVersion, Set<String> attributeNames);
  447
+
  448
+    @LogMessage(level = WARN)
  449
+    @Message(id = 13403, value = "Transforming resource %s for host controller '%s' to core model version '%s' -- attributes %s are not understood in that model version and this resource will need to be ignored on that host.")
  450
+    void newAttributesCoreModelResourceTransformerFoundDefinedAttributes(PathAddress pathAddress, String legacyHostName, ModelVersion modelVersion, Set<String> attributeNames);
  451
+
  452
+    @LogMessage(level = WARN)
  453
+    @Message(id = 13404, value = "Transforming resource %s for host controller '%s' to subsystem '%s' model version '%s' -- attributes %s are not understood in that model version and this resource will need to be ignored on that host.")
  454
+    void newAttributesSubsystemModelResourceTransformerFoundDefinedAttributes(PathAddress pathAddress, String legacyHostName, String subsystem, ModelVersion modelVersion, Set<String> attributeNames);
  455
+
447 456
 }
33  controller/src/main/java/org/jboss/as/controller/ControllerMessages.java
@@ -2579,29 +2579,28 @@
2579 2579
     @Message(id = 14884, value = "No operation named '%s' exists at address %s")
2580 2580
     String noHandlerForOperation(String operationName, PathAddress address);
2581 2581
 
2582  
-    /**
2583  
-     * Indicates {@code permissionName} is not a valid permission for use with permission class {@code permissionClass}
2584  
-     * @param permissionClass the class of the permission
2585  
-     * @param permissionName the name of the permission provided by the user
2586  
-     * @return the exception
2587  
-     */
2588  
-    @Message(id = 14885, value = "Invalid %s \"%s\"")
2589  
-    IllegalArgumentException invalidPermission(String permissionClass, String permissionName);
2590  
-
2591  
-    @Message(id = 14886, value = "Method cannot be called from a chained transformer")
2592  
-    IllegalStateException cannotCallMethodFromChainedTransformer();
2593  
-
2594  
-
2595  
-    @Message(id = 14887, value = "Transforming resource %s for host controller '%s' to core model version '%s' -- attributes %s do not support expressions in that model version and this resource will need to be ignored on that host.")
  2582
+    @Message(id = 14885, value = "Transforming resource %s for host controller '%s' to core model version '%s' -- attributes %s do not support expressions in that model version and this resource will need to be ignored on that host.")
2596 2583
     OperationFailedException rejectExpressionCoreModelResourceTransformerFoundExpressions(PathAddress pathAddress, String legacyHostName, ModelVersion modelVersion, Set<String> attributeNames);
2597 2584
 
2598  
-    @Message(id = 14888, value = "Transforming operation %s at resource %s for host controller '%s' to core model version '%s' -- attributes %s do not support expressions in that model version and this resource will need to be ignored on that host.")
  2585
+    @Message(id = 14886, value = "Transforming operation %s at resource %s for host controller '%s' to core model version '%s' -- attributes %s do not support expressions in that model version and this resource will need to be ignored on that host.")
2599 2586
     OperationFailedException rejectExpressionCoreModelOperationTransformerFoundExpressions(ModelNode op, PathAddress pathAddress, String legacyHostName, ModelVersion modelVersion, Set<String> attributeNames);
2600 2587
 
2601  
-    @Message(id = 14889, value = "Transforming resource %s for host controller '%s' to subsystem '%s' model version '%s' -- attributes %s do not support expressions in that model version and this resource will need to be ignored on that host.")
  2588
+    @Message(id = 14887, value = "Transforming resource %s for host controller '%s' to subsystem '%s' model version '%s' -- attributes %s do not support expressions in that model version and this resource will need to be ignored on that host.")
2602 2589
     OperationFailedException rejectExpressionSubsystemModelResourceTransformerFoundExpressions(PathAddress pathAddress, String legacyHostName, String subsystem, ModelVersion modelVersion, Set<String> attributeNames);
2603 2590
 
2604  
-    @Message(id = 14890, value = "Transforming operation %s at resource %s for host controller '%s' to subsystem '%s' model version '%s' -- attributes %s do not support expressions in that model version and this resource will need to be ignored on that host.")
  2591
+    @Message(id = 14888, value = "Transforming operation %s at resource %s for host controller '%s' to subsystem '%s' model version '%s' -- attributes %s do not support expressions in that model version and this resource will need to be ignored on that host.")
2605 2592
     OperationFailedException rejectExpressionSubsystemModelOperationTransformerFoundExpressions(ModelNode op, PathAddress pathAddress, String legacyHostName, String subsystem, ModelVersion modelVersion, Set<String> attributeNames);
2606 2593
 
  2594
+    @Message(id = 14889, value = "Transforming resource %s for host controller '%s' to core model version '%s' -- attributes %s are not understood in that model version and this resource will need to be ignored on that host.")
  2595
+    OperationFailedException newAttributesCoreModelResourceTransformerFoundDefinedAttributes(PathAddress pathAddress, String legacyHostName, ModelVersion modelVersion, Set<String> attributeNames);
  2596
+
  2597
+    @Message(id = 14890, value = "Transforming operation %s at resource %s for host controller '%s' to core model version '%s' -- attributes %s are not understood in that model version and this resource will need to be ignored on that host.")
  2598
+    OperationFailedException newAttributesCoreModelOperationTransformerFoundDefinedAttributes(ModelNode op, PathAddress pathAddress, String legacyHostName, ModelVersion modelVersion, Set<String> attributeNames);
  2599
+
  2600
+    @Message(id = 14891, value = "Transforming resource %s for host controller '%s' to subsystem '%s' model version '%s' -- attributes %s are not understood in that model version and this resource will need to be ignored on that host.")
  2601
+    OperationFailedException newAttributesSubsystemModelResourceTransformerFoundDefinedAttributes(PathAddress pathAddress, String legacyHostName, String subsystem, ModelVersion modelVersion, Set<String> attributeNames);
  2602
+
  2603
+    @Message(id = 14892, value = "Transforming operation %s at resource %s for host controller '%s' to subsystem '%s' model version '%s' -- attributes %s are not understood in that model version and this resource will need to be ignored on that host.")
  2604
+    OperationFailedException newAttributesSubsystemModelOperationTransformerFoundDefinedAttributes(ModelNode op, PathAddress pathAddress, String legacyHostName, String subsystem, ModelVersion modelVersion, Set<String> attributeNames);
  2605
+
2607 2606
 }
40  ...ormers/AddNameFromAddressResourceTransformer.java → ...nsform/AddNameFromAddressResourceTransformer.java
@@ -19,29 +19,51 @@
19 19
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 20
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 21
 */
22  
-package org.jboss.as.domain.controller.transformers;
  22
+package org.jboss.as.controller.transform;
23 23
 
24 24
 import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NAME;
25 25
 
26 26
 import org.jboss.as.controller.OperationFailedException;
27 27
 import org.jboss.as.controller.PathAddress;
28 28
 import org.jboss.as.controller.PathElement;
  29
+import org.jboss.as.controller.ReadResourceNameOperationStepHandler;
29 30
 import org.jboss.as.controller.registry.Resource;
30  
-import org.jboss.as.controller.transform.ResourceTransformationContext;
31  
-import org.jboss.as.controller.transform.ResourceTransformer;
  31
+import org.jboss.as.controller.transform.chained.ChainedResourceTransformationContext;
  32
+import org.jboss.as.controller.transform.chained.ChainedResourceTransformerEntry;
32 33
 
33  
-class AddNameFromAddressResourceTransformer implements ResourceTransformer {
34  
-    static final ResourceTransformer INSTANCE = new AddNameFromAddressResourceTransformer();
  34
+/**
  35
+ * {@link ResourceTransformer} that takes the value in the last element of the given address
  36
+ * and stores it in a model attribute named {@code name}.
  37
+ * <p>
  38
+ * This transformer can be used to preserve compatibility when {@link ReadResourceNameOperationStepHandler} is
  39
+ * used to replace storage of a resource name in the model.
  40
+ * </p>
  41
+ *
  42
+ * @see ReadResourceNameOperationStepHandler
  43
+ */
  44
+@SuppressWarnings("deprecation")
  45
+public class AddNameFromAddressResourceTransformer implements ResourceTransformer, ChainedResourceTransformerEntry {
  46
+    public static final AddNameFromAddressResourceTransformer INSTANCE = new AddNameFromAddressResourceTransformer();
35 47
 
36 48
     private AddNameFromAddressResourceTransformer() {
37 49
     }
38 50
 
39 51
     @Override
40 52
     public void transformResource(final ResourceTransformationContext context, final PathAddress address, final Resource resource) throws OperationFailedException {
41  
-        //The
42  
-        final PathElement element = address.getLastElement();
43  
-        resource.getModel().get(NAME).set(element.getValue());
  53
+
  54
+        transformResourceInternal(address, resource);
44 55
         ResourceTransformationContext childContext = context.addTransformedResource(PathAddress.EMPTY_ADDRESS, resource);
45 56
         childContext.processChildren(resource);
46 57
     }
47  
-}
  58
+
  59
+    @Override
  60
+    public void transformResource(ChainedResourceTransformationContext context, PathAddress address, Resource resource) throws OperationFailedException {
  61
+        transformResourceInternal(address, resource);
  62
+    }
  63
+
  64
+    private void transformResourceInternal(final PathAddress address, final Resource resource) throws OperationFailedException {
  65
+
  66
+        final PathElement element = address.getLastElement();
  67
+        resource.getModel().get(NAME).set(element.getValue());
  68
+    }
  69
+}
257  controller/src/main/java/org/jboss/as/controller/transform/DiscardUndefinedAttributesTransformer.java
... ...
@@ -0,0 +1,257 @@
  1
+/*
  2
+ * JBoss, Home of Professional Open Source.
  3
+ * Copyright 2012, Red Hat, Inc., and individual contributors
  4
+ * as indicated by the @author tags. See the copyright.txt file in the
  5
+ * distribution for a full listing of individual contributors.
  6
+ *
  7
+ * This is free software; you can redistribute it and/or modify it
  8
+ * under the terms of the GNU Lesser General Public License as
  9
+ * published by the Free Software Foundation; either version 2.1 of
  10
+ * the License, or (at your option) any later version.
  11
+ *
  12
+ * This software is distributed in the hope that it will be useful,
  13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15
+ * Lesser General Public License for more details.
  16
+ *
  17
+ * You should have received a copy of the GNU Lesser General Public
  18
+ * License along with this software; if not, write to the Free
  19
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  21
+ */
  22
+
  23
+package org.jboss.as.controller.transform;
  24
+
  25
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.NAME;
  26
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM;
  27
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.VALUE;
  28
+
  29
+import java.util.Arrays;
  30
+import java.util.Collections;
  31
+import java.util.HashSet;
  32
+import java.util.Set;
  33
+
  34
+import org.jboss.as.controller.AttributeDefinition;
  35
+import org.jboss.as.controller.ControllerLogger;
  36
+import org.jboss.as.controller.ControllerMessages;
  37
+import org.jboss.as.controller.ModelVersion;
  38
+import org.jboss.as.controller.OperationFailedException;
  39
+import org.jboss.as.controller.PathAddress;
  40
+import org.jboss.as.controller.PathElement;
  41
+import org.jboss.as.controller.registry.Resource;
  42
+import org.jboss.as.controller.transform.chained.ChainedResourceTransformationContext;
  43
+import org.jboss.as.controller.transform.chained.ChainedResourceTransformerEntry;
  44
+import org.jboss.dmr.ModelNode;
  45
+
  46
+/**
  47
+ * Transformer that hides new attributes from legacy slaves if the attribute value is undefined. A defined value
  48
+ * leads to a log warning or an {@link OperationFailedException} unless the resource is ignored by the target.
  49
+ *
  50
+ * @author Brian Stansberry (c) 2012 Red Hat Inc.
  51
+ */
  52
+public class DiscardUndefinedAttributesTransformer implements ChainedResourceTransformerEntry, ResourceTransformer, OperationTransformer {
  53
+
  54
+    private final Set<String> attributeNames;
  55
+    private final OperationTransformer writeAttributeTransformer = new WriteAttributeTransformer();
  56
+    private final OperationTransformer undefineAttributeTransformer = new UndefineAttributeTransformer();
  57
+
  58
+    public DiscardUndefinedAttributesTransformer(AttributeDefinition... attributes) {
  59
+        this(namesFromDefinitions(attributes));
  60
+    }
  61
+
  62
+    private static Set<String> namesFromDefinitions(AttributeDefinition... attributes) {
  63
+        final Set<String> names = new HashSet<String>();
  64
+        for(final AttributeDefinition def : attributes) {
  65
+            names.add(def.getName());
  66
+        }
  67
+        return names;
  68
+    }
  69
+
  70
+    public DiscardUndefinedAttributesTransformer(String... attributeNames) {
  71
+        this(new HashSet<String>(Arrays.asList(attributeNames)));
  72
+    }
  73
+
  74
+    public DiscardUndefinedAttributesTransformer(Set<String> attributeNames) {
  75
+        this.attributeNames = attributeNames;
  76
+    }
  77
+
  78
+    public OperationTransformer getWriteAttributeTransformer() {
  79
+        return writeAttributeTransformer;
  80
+    }
  81
+
  82
+    public OperationTransformer getUndefineAttributeTransformer() {
  83
+        return undefineAttributeTransformer;
  84
+    }
  85
+
  86
+    @Override
  87
+    public void transformResource(ChainedResourceTransformationContext context, PathAddress address, Resource resource) throws OperationFailedException {
  88
+        transformResource(context.getTarget(), address, resource);
  89
+    }
  90
+
  91
+    @Override
  92
+    public void transformResource(ResourceTransformationContext context, PathAddress address, Resource resource) throws OperationFailedException {
  93
+        transformResource(context.getTarget(), address, resource);
  94
+
  95
+        final ResourceTransformationContext childContext = context.addTransformedResource(PathAddress.EMPTY_ADDRESS, resource);
  96
+        childContext.processChildren(resource);
  97
+    }
  98
+
  99
+    @Override
  100
+    public TransformedOperation transformOperation(final TransformationContext context, final PathAddress address,
  101
+                                                   final ModelNode operation) throws OperationFailedException {
  102
+
  103
+        final Set<String> problems = checkModelNode(operation);
  104
+        final boolean reject = problems != null;
  105
+        final OperationRejectionPolicy rejectPolicy;
  106
+        if (reject) {
  107
+            rejectPolicy = new OperationRejectionPolicy() {
  108
+                @Override
  109
+                public boolean rejectOperation(ModelNode preparedResult) {
  110
+                    // Reject successful operations
  111
+                    return true;
  112
+                }
  113
+
  114
+                @Override
  115
+                public String getFailureDescription() {
  116
+                    // TODO OFE.getMessage
  117
+                    try {
  118
+                        return logWarning(context.getTarget(), address, problems, operation);
  119
+                    } catch (OperationFailedException e) {
  120
+                        //This will not happen
  121
+                        return null;
  122
+                    }
  123
+                }
  124
+            };
  125
+        } else {
  126
+            rejectPolicy = OperationTransformer.DEFAULT_REJECTION_POLICY;
  127
+        }
  128
+        // Return untransformed
  129
+        return new TransformedOperation(operation, rejectPolicy, OperationResultTransformer.ORIGINAL_RESULT);
  130
+    }
  131
+
  132
+    private void transformResource(TransformationTarget target, PathAddress address,
  133
+                                   Resource resource) throws OperationFailedException {
  134
+
  135
+        Set<String> problems = checkModelNode(resource.getModel());
  136
+        if (problems != null) {
  137
+            logWarning(target, address, problems, null);
  138
+        }
  139
+    }
  140
+
  141
+    private Set<String> checkModelNode(ModelNode modelNode) {
  142
+
  143
+        Set<String> problems = null;
  144
+        for (String attr : attributeNames) {
  145
+            if (modelNode.has(attr)) {
  146
+                if (modelNode.hasDefined(attr)) {
  147
+                    if (problems == null) {
  148
+                        problems = new HashSet<String>();
  149
+                    }
  150
+                    problems.add(attr);
  151
+                } else {
  152
+                    modelNode.remove(attr);
  153
+                }
  154
+            }
  155
+        }
  156
+        return problems;
  157
+    }
  158
+
  159
+    private class WriteAttributeTransformer implements OperationTransformer {
  160
+
  161
+        @Override
  162
+        public TransformedOperation transformOperation(final TransformationContext context, final PathAddress address, final ModelNode operation) throws OperationFailedException {
  163
+            final String attribute = operation.require(NAME).asString();
  164
+            boolean ourAttribute = attributeNames.contains(attribute);
  165
+            final boolean rejectResult = ourAttribute && operation.hasDefined(VALUE);
  166
+            if (rejectResult) {
  167
+                // Create the rejection policy
  168
+                final OperationRejectionPolicy rejectPolicy = new OperationRejectionPolicy() {
  169
+                    @Override
  170
+                    public boolean rejectOperation(ModelNode preparedResult) {
  171
+                        // Reject successful operations
  172
+                        return true;
  173
+                    }
  174
+
  175
+                    @Override
  176
+                    public String getFailureDescription() {
  177
+                        try {
  178
+                            return logWarning(context.getTarget(), address, Collections.singleton(attribute), operation);
  179
+                        } catch (OperationFailedException e) {
  180
+                            //This will not happen
  181
+                            return null;
  182
+                        }
  183
+                    }
  184
+                };
  185
+                return new TransformedOperation(operation, rejectPolicy, OperationResultTransformer.ORIGINAL_RESULT);
  186
+            } else if (ourAttribute) {
  187
+                // It's an attribute the slave doesn't understand, but the new value is "undefined"
  188
+                // Just discard this operation
  189
+                return OperationTransformer.DISCARD.transformOperation(context, address, operation);
  190
+            }
  191
+            // Not relevant to us
  192
+            return new TransformedOperation(operation, OperationResultTransformer.ORIGINAL_RESULT);
  193
+        }
  194
+    }
  195
+
  196
+    private class UndefineAttributeTransformer implements OperationTransformer {
  197
+
  198
+        @Override
  199
+        public TransformedOperation transformOperation(final TransformationContext context, final PathAddress address, final ModelNode operation) throws OperationFailedException {
  200
+            final String attribute = operation.require(NAME).asString();
  201
+            if (attributeNames.contains(attribute)) {
  202
+                // It's an attribute the slave doesn't understand, but the new value is "undefined"
  203
+                // Just discard this operation
  204
+                return OperationTransformer.DISCARD.transformOperation(context, address, operation);
  205
+            }
  206
+            // Not relevant to us
  207
+            return new TransformedOperation(operation, OperationResultTransformer.ORIGINAL_RESULT);
  208
+        }
  209
+    }
  210
+
  211
+    private String logWarning(TransformationTarget tgt, PathAddress pathAddress, Set<String> attributes, ModelNode op) throws OperationFailedException {
  212
+
  213
+        //TODO the determining of whether the version is 1.4.0, i.e. knows about ignored resources or not could be moved to a utility method
  214
+
  215
+        final String hostName = tgt.getHostName();
  216
+        final ModelVersion coreVersion = tgt.getVersion();
  217
+        final String subsystemName = findSubsystemVersion(pathAddress);
  218
+        final ModelVersion usedVersion = subsystemName == null ? coreVersion : tgt.getSubsystemVersion(subsystemName);
  219
+
  220
+        //For 7.1.x, we have no idea if the slave has ignored the resource or not. On 7.2.x the slave registers the ignored resources as
  221
+        //part of the registration process so we have a better idea and can throw errors if the slave was ignored
  222
+        if (op == null) {
  223
+            if (coreVersion.getMajor() >= 1 && coreVersion.getMinor() >= 4) {
  224
+                //We are 7.2.x so we should throw an error
  225
+                if (subsystemName != null) {
  226
+                    throw ControllerMessages.MESSAGES.newAttributesSubsystemModelResourceTransformerFoundDefinedAttributes(pathAddress, hostName, subsystemName, usedVersion, attributes);
  227
+                }
  228
+                throw ControllerMessages.MESSAGES.newAttributesCoreModelResourceTransformerFoundDefinedAttributes(pathAddress, hostName, usedVersion, attributes);
  229
+            }
  230
+        }
  231
+
  232
+        if (op == null) {
  233
+            if (subsystemName != null) {
  234
+                ControllerLogger.TRANSFORMER_LOGGER.newAttributesSubsystemModelResourceTransformerFoundDefinedAttributes(pathAddress, hostName, subsystemName, usedVersion, attributes);
  235
+            } else {
  236
+                ControllerLogger.TRANSFORMER_LOGGER.newAttributesCoreModelResourceTransformerFoundDefinedAttributes(pathAddress, hostName, usedVersion, attributes);
  237
+            }
  238
+            return null;
  239
+        } else {
  240
+            if (subsystemName != null) {
  241
+                return ControllerMessages.MESSAGES.newAttributesSubsystemModelOperationTransformerFoundDefinedAttributes(op, pathAddress, hostName, subsystemName, usedVersion, attributes).getMessage();
  242
+            } else {
  243
+                return ControllerMessages.MESSAGES.newAttributesCoreModelOperationTransformerFoundDefinedAttributes(op, pathAddress, hostName, usedVersion, attributes).getMessage();
  244
+            }
  245
+        }
  246
+    }
  247
+
  248
+
  249
+    private String findSubsystemVersion(PathAddress pathAddress) {
  250
+        for (PathElement element : pathAddress) {
  251
+            if (element.getKey().equals(SUBSYSTEM)) {
  252
+                return element.getValue();
  253
+            }
  254
+        }
  255
+        return null;
  256
+    }
  257
+}
1  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/CacheFactoryResourceDefinition.java
@@ -27,7 +27,6 @@
27 27
 import org.jboss.as.controller.AttributeDefinition;
28 28
 import org.jboss.as.controller.AttributeMarshaller;
29 29
 import org.jboss.as.controller.PathElement;
30  
-import org.jboss.as.controller.ReadResourceNameOperationStepHandler;
31 30
 import org.jboss.as.controller.ReloadRequiredWriteAttributeHandler;
32 31
 import org.jboss.as.controller.SimpleAttributeDefinition;
33 32
 import org.jboss.as.controller.SimpleAttributeDefinitionBuilder;
15  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/ChannelCreationOptionResource.java
@@ -21,6 +21,9 @@
21 21
  */
22 22
 package org.jboss.as.ejb3.subsystem;
23 23
 
  24
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
  25
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION;
  26
+
24 27
 import org.jboss.as.controller.AttributeDefinition;
25 28
 import org.jboss.as.controller.OperationContext;
26 29
 import org.jboss.as.controller.OperationFailedException;
@@ -37,6 +40,9 @@
37 40
 import org.jboss.as.controller.operations.validation.ModelTypeValidator;
38 41
 import org.jboss.as.controller.registry.AttributeAccess;
39 42
 import org.jboss.as.controller.registry.ManagementResourceRegistration;
  43
+import org.jboss.as.controller.transform.RejectExpressionValuesTransformer;
  44
+import org.jboss.as.controller.transform.ResourceTransformer;
  45
+import org.jboss.as.controller.transform.TransformersSubRegistration;
40 46
 import org.jboss.as.ejb3.EjbMessages;
41 47
 import org.jboss.as.ejb3.remote.EJBRemoteConnectorService;
42 48
 import org.jboss.dmr.ModelNode;
@@ -184,5 +190,14 @@ public void validateParameter(String parameterName, ModelNode value) throws Oper
184 190
         }
185 191
     }
186 192
 
  193
+    static void registerTransformers_1_1_0(TransformersSubRegistration parent) {
  194
+
  195
+        RejectExpressionValuesTransformer transformer = new RejectExpressionValuesTransformer(CHANNEL_CREATION_OPTION_VALUE);
  196
+        final TransformersSubRegistration transformers110 = parent.registerSubResource(INSTANCE.getPathElement(),
  197
+                (ResourceTransformer) transformer);
  198
+        transformers110.registerOperationTransformer(ADD, transformer);
  199
+        transformers110.registerOperationTransformer(WRITE_ATTRIBUTE_OPERATION, transformer.getWriteAttributeTransformer());
  200
+    }
  201
+
187 202
 
188 203
 }
17  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/ClusterPassivationStoreResourceDefinition.java
@@ -22,13 +22,19 @@
22 22
 
23 23
 package org.jboss.as.ejb3.subsystem;
24 24
 
  25
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION;
  26
+
25 27
 import org.jboss.as.controller.AttributeDefinition;
26 28
 import org.jboss.as.controller.ReadResourceNameOperationStepHandler;
27 29
 import org.jboss.as.controller.SimpleAttributeDefinition;
28 30
 import org.jboss.as.controller.SimpleAttributeDefinitionBuilder;
  31
+import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
29 32
 import org.jboss.as.controller.registry.AttributeAccess;
30 33
 import org.jboss.as.controller.registry.ManagementResourceRegistration;
31 34
 import org.jboss.as.controller.registry.OperationEntry;
  35
+import org.jboss.as.controller.transform.RejectExpressionValuesTransformer;
  36
+import org.jboss.as.controller.transform.ResourceTransformer;
  37
+import org.jboss.as.controller.transform.TransformersSubRegistration;
32 38
 import org.jboss.as.ejb3.cache.impl.backing.clustering.ClusteredBackingCacheEntryStoreConfig;
33 39
 import org.jboss.dmr.ModelNode;
34 40
 import org.jboss.dmr.ModelType;
@@ -38,7 +44,9 @@
38 44
  */
39 45
 public class ClusterPassivationStoreResourceDefinition extends PassivationStoreResourceDefinition {
40 46
 
41  
-    static final SimpleAttributeDefinition MAX_SIZE = MAX_SIZE_BUILDER.setDefaultValue(new ModelNode(ClusteredBackingCacheEntryStoreConfig.DEFAULT_MAX_SIZE)).build();
  47
+    static final SimpleAttributeDefinition MAX_SIZE = new SimpleAttributeDefinitionBuilder(MAX_SIZE_BUILDER.build())
  48
+            .setDefaultValue(new ModelNode(ClusteredBackingCacheEntryStoreConfig.DEFAULT_MAX_SIZE)).build();
  49
+
42 50
     static final SimpleAttributeDefinition CACHE_CONTAINER =
43 51
             new SimpleAttributeDefinitionBuilder(EJB3SubsystemModel.CACHE_CONTAINER, ModelType.STRING, true)
44 52
                     .setXmlName(EJB3SubsystemXMLAttribute.CACHE_CONTAINER.getLocalName())
@@ -76,6 +84,11 @@
76 84
     static final ClusterPassivationStoreResourceDefinition INSTANCE = new ClusterPassivationStoreResourceDefinition();
77 85
 
78 86
     private ClusterPassivationStoreResourceDefinition() {
79  
-        super(EJB3SubsystemModel.CLUSTER_PASSIVATION_STORE, ADD_HANDLER, REMOVE_HANDLER, OperationEntry.Flag.RESTART_NONE, OperationEntry.Flag.RESTART_RESOURCE_SERVICES, WRITE_HANDLER, ATTRIBUTES);
  87
+        super(EJB3SubsystemModel.CLUSTER_PASSIVATION_STORE, ADD_HANDLER, REMOVE_HANDLER, OperationEntry.Flag.RESTART_NONE,
  88
+                OperationEntry.Flag.RESTART_RESOURCE_SERVICES, WRITE_HANDLER, ATTRIBUTES);
  89
+    }
  90
+
  91
+    static void registerTransformers_1_1_0(TransformersSubRegistration parent) {
  92
+        PassivationStoreResourceDefinition.registerTransformers_1_1_0(INSTANCE.getPathElement(), parent);
80 93
     }
81 94
 }
65  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3Extension.java
@@ -24,7 +24,6 @@
24 24
 
25 25
 import org.jboss.as.controller.Extension;
26 26
 import org.jboss.as.controller.ExtensionContext;
27  
-import org.jboss.as.controller.ModelVersion;
28 27
 import org.jboss.as.controller.PathElement;
29 28
 import org.jboss.as.controller.ResourceDefinition;
30 29
 import org.jboss.as.controller.SimpleResourceDefinition;
@@ -32,12 +31,10 @@
32 31
 import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
33 32
 import org.jboss.as.controller.descriptions.ResourceDescriptionResolver;
34 33
 import org.jboss.as.controller.descriptions.StandardResourceDescriptionResolver;
35  
-import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler;
36 34
 import org.jboss.as.controller.parsing.ExtensionParsingContext;
37 35
 import org.jboss.as.controller.registry.ManagementResourceRegistration;
  36
+import org.jboss.as.controller.services.path.PathManager;
38 37
 import org.jboss.as.controller.services.path.ResolvePathHandler;
39  
-import org.jboss.as.controller.transform.ResourceTransformer;
40  
-import org.jboss.as.controller.transform.TransformersSubRegistration;
41 38
 import org.jboss.as.ejb3.subsystem.deployment.EntityBeanResourceDefinition;
42 39
 import org.jboss.as.ejb3.subsystem.deployment.MessageDrivenBeanResourceDefinition;
43 40
 import org.jboss.as.ejb3.subsystem.deployment.SingletonBeanDeploymentResourceDefinition;
@@ -62,6 +59,8 @@
62 59
     public static final String NAMESPACE_1_3 = EJB3SubsystemNamespace.EJB3_1_3.getUriString();
63 60
     public static final String NAMESPACE_1_4 = EJB3SubsystemNamespace.EJB3_1_4.getUriString();
64 61
 
  62
+    static final PathElement SUBSYSTEM_PATH = PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME);
  63
+
65 64
     private static final int MANAGEMENT_API_MAJOR_VERSION = 1;
66 65
     private static final int MANAGEMENT_API_MINOR_VERSION = 2;
67 66
     private static final int MANAGEMENT_API_MICRO_VERSION = 0;
@@ -85,41 +84,8 @@ public void initialize(ExtensionContext context) {
85 84
 
86 85
         subsystem.registerXMLElementWriter(EJB3SubsystemXMLPersister.INSTANCE);
87 86
 
88  
-        final ManagementResourceRegistration subsystemRegistration = subsystem.registerSubsystemModel(EJB3SubsystemRootResourceDefinition.INSTANCE);
89  
-
90  
-        // describe operation for the subsystem
91  
-        subsystemRegistration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
92  
-
93  
-        // subsystem=ejb3/service=remote
94  
-        subsystemRegistration.registerSubModel(EJB3RemoteResourceDefinition.INSTANCE);
95  
-
96  
-        // subsystem=ejb3/service=async
97  
-        subsystemRegistration.registerSubModel(EJB3AsyncResourceDefinition.INSTANCE);
98  
-
99  
-        // subsystem=ejb3/strict-max-bean-instance-pool=*
100  
-        subsystemRegistration.registerSubModel(StrictMaxPoolResourceDefinition.INSTANCE);
101  
-
102  
-        subsystemRegistration.registerSubModel(CacheFactoryResourceDefinition.INSTANCE);
103  
-        subsystemRegistration.registerSubModel(FilePassivationStoreResourceDefinition.INSTANCE);
104  
-        subsystemRegistration.registerSubModel(ClusterPassivationStoreResourceDefinition.INSTANCE);
105  
-
106  
-        // subsystem=ejb3/service=timerservice
107  
-        final ManagementResourceRegistration timerService = subsystemRegistration.registerSubModel(TimerServiceResourceDefinition.INSTANCE);
108  
-        // Create the path resolver handler
109  
-        if (context.getProcessType().isServer()) {
110  
-            final ResolvePathHandler resolvePathHandler = ResolvePathHandler.Builder.of(context.getPathManager())
111  
-                    .setPathAttribute(TimerServiceResourceDefinition.PATH)
112  
-                    .setRelativeToAttribute(TimerServiceResourceDefinition.RELATIVE_TO)
113  
-                    .build();
114  
-            timerService.registerOperationHandler(resolvePathHandler.getOperationDefinition(), resolvePathHandler);
115  
-        }
116  
-
117  
-        // subsystem=ejb3/thread-pool=*
118  
-        subsystemRegistration.registerSubModel(UnboundedQueueThreadPoolResourceDefinition.create(EJB3SubsystemModel.THREAD_POOL,
119  
-                new EJB3ThreadFactoryResolver(), EJB3SubsystemModel.BASE_THREAD_POOL_SERVICE_NAME, registerRuntimeOnly));
120  
-
121  
-        // subsystem=ejb3/service=iiop
122  
-        subsystemRegistration.registerSubModel(EJB3IIOPResourceDefinition.INSTANCE);
  87
+        PathManager pathManager = context.getProcessType().isServer() ? context.getPathManager() : null;
  88
+        subsystem.registerSubsystemModel(new EJB3SubsystemRootResourceDefinition(registerRuntimeOnly, pathManager));
123 89
 
124 90
         if (registerRuntimeOnly) {
125 91
             ResourceDefinition deploymentsDef = new SimpleResourceDefinition(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME),
@@ -132,13 +98,8 @@ public void initialize(ExtensionContext context) {
132 98
             deploymentsRegistration.registerSubModel(StatefulSessionBeanDeploymentResourceDefinition.INSTANCE);
133 99
         }
134 100
 
135  
-        registerTransformers(subsystem);
136  
-    }
137  
-
138  
-    private void registerTransformers(SubsystemRegistration subsystem) {
139  
-        ModelVersion subsystem110 = ModelVersion.create(1, 1);
140  
-        final TransformersSubRegistration transformers110 = subsystem.registerModelTransformers(subsystem110, ResourceTransformer.DEFAULT);
141  
-        UnboundedQueueThreadPoolResourceDefinition.registerTransformers1_0(transformers110, EJB3SubsystemModel.THREAD_POOL);
  101
+        // Transformers
  102
+        EJB3SubsystemRootResourceDefinition.registerTransformers(subsystem);
142 103
     }
143 104
 
144 105
     /**
@@ -152,16 +113,4 @@ public void initializeParsers(ExtensionParsingContext context) {
152 113
         context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_1_3, EJB3Subsystem13Parser.INSTANCE);
153 114
         context.setSubsystemXmlMapping(SUBSYSTEM_NAME, NAMESPACE_1_4, EJB3Subsystem14Parser.INSTANCE);
154 115
     }
155  
-
156  
-    private static class EJB3ThreadFactoryResolver extends ThreadFactoryResolver.SimpleResolver {
157  
-
158  
-        private EJB3ThreadFactoryResolver() {
159  
-            super(ThreadsServices.FACTORY);
160  
-        }
161  
-
162  
-        @Override
163  
-        protected String getThreadGroupName(String threadPoolName) {
164  
-            return "EJB " + threadPoolName;
165  
-        }
166  
-    }
167 116
 }
13  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3RemoteResourceDefinition.java
@@ -22,6 +22,9 @@
22 22
 
23 23
 package org.jboss.as.ejb3.subsystem;
24 24
 
  25
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
  26
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION;
  27
+
25 28
 import org.jboss.as.controller.AttributeDefinition;
26 29
 import org.jboss.as.controller.ReloadRequiredWriteAttributeHandler;
27 30
 import org.jboss.as.controller.SimpleAttributeDefinition;
@@ -29,6 +32,9 @@
29 32
 import org.jboss.as.controller.SimpleResourceDefinition;
30 33
 import org.jboss.as.controller.registry.AttributeAccess;
31 34
 import org.jboss.as.controller.registry.ManagementResourceRegistration;
  35
+import org.jboss.as.controller.transform.RejectExpressionValuesTransformer;
  36
+import org.jboss.as.controller.transform.ResourceTransformer;
  37
+import org.jboss.as.controller.transform.TransformersSubRegistration;
32 38
 import org.jboss.dmr.ModelType;
33 39
 
34 40
 import java.util.Collections;
@@ -88,4 +94,11 @@ public void registerChildren(ManagementResourceRegistration resourceRegistration
88 94
         // register channel-creation-options as sub model for EJB remote service
89 95
         resourceRegistration.registerSubModel(new ChannelCreationOptionResource());
90 96
     }
  97
+
  98
+    static void registerTransformers_1_1_0(TransformersSubRegistration parent) {
  99
+
  100
+        final TransformersSubRegistration transformers110 = parent.registerSubResource(EJB3SubsystemModel.REMOTE_SERVICE_PATH,
  101
+                ResourceTransformer.DEFAULT);
  102
+        ChannelCreationOptionResource.registerTransformers_1_1_0(transformers110);
  103
+    }
91 104
 }
94  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/EJB3SubsystemRootResourceDefinition.java
@@ -22,18 +22,34 @@
22 22
 
23 23
 package org.jboss.as.ejb3.subsystem;
24 24
 
  25
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
  26
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.UNDEFINE_ATTRIBUTE_OPERATION;
  27
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION;
  28
+
  29
+import org.jboss.as.controller.ModelVersion;
25 30
 import org.jboss.as.controller.PathElement;
26 31
 import org.jboss.as.controller.ResourceDefinition;
27 32
 import org.jboss.as.controller.SimpleAttributeDefinition;
28 33
 import org.jboss.as.controller.SimpleAttributeDefinitionBuilder;
29 34
 import org.jboss.as.controller.SimpleResourceDefinition;
  35
+import org.jboss.as.controller.SubsystemRegistration;
30 36
 import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
  37
+import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler;
31 38
 import org.jboss.as.controller.operations.validation.LongRangeValidator;
32 39
 import org.jboss.as.controller.operations.validation.StringLengthValidator;
33 40
 import org.jboss.as.controller.registry.AttributeAccess;
34 41
 import org.jboss.as.controller.registry.ManagementResourceRegistration;
35 42
 import org.jboss.as.controller.registry.OperationEntry;
  43
+import org.jboss.as.controller.services.path.PathManager;
  44
+import org.jboss.as.controller.transform.DiscardUndefinedAttributesTransformer;
  45
+import org.jboss.as.controller.transform.RejectExpressionValuesTransformer;
  46
+import org.jboss.as.controller.transform.TransformersSubRegistration;
  47
+import org.jboss.as.controller.transform.chained.ChainedOperationTransformer;
  48
+import org.jboss.as.controller.transform.chained.ChainedResourceTransformer;
36 49
 import org.jboss.as.ejb3.deployment.processors.EJBDefaultSecurityDomainProcessor;
  50
+import org.jboss.as.threads.ThreadFactoryResolver;
  51
+import org.jboss.as.threads.ThreadsServices;
  52
+import org.jboss.as.threads.UnboundedQueueThreadPoolResourceDefinition;
37 53
 import org.jboss.dmr.ModelNode;
38 54
 import org.jboss.dmr.ModelType;
39 55
 
@@ -113,14 +129,16 @@
113 129
 
114 130
     private static final EJBDefaultSecurityDomainProcessor defaultSecurityDomainDeploymentProcessor = new EJBDefaultSecurityDomainProcessor(null);
115 131
 
116  
-    public static final EJB3SubsystemRootResourceDefinition INSTANCE = new EJB3SubsystemRootResourceDefinition();
117  
-
  132
+    private final boolean registerRuntimeOnly;
  133
+    private final PathManager pathManager;
118 134
 
119  
-    private EJB3SubsystemRootResourceDefinition() {
  135
+    EJB3SubsystemRootResourceDefinition(boolean registerRuntimeOnly, PathManager pathManager) {
120 136
         super(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, EJB3Extension.SUBSYSTEM_NAME),
121 137
                 EJB3Extension.getResourceDescriptionResolver(EJB3Extension.SUBSYSTEM_NAME),
122 138
                 new EJB3SubsystemAdd(defaultSecurityDomainDeploymentProcessor), EJB3SubsystemRemove.INSTANCE,
123 139
                 OperationEntry.Flag.RESTART_ALL_SERVICES, OperationEntry.Flag.RESTART_ALL_SERVICES);
  140
+        this.registerRuntimeOnly = registerRuntimeOnly;
  141
+        this.pathManager = pathManager;
124 142
     }
125 143
 
126 144
     static final SimpleAttributeDefinition[] ATTRIBUTES = {
@@ -157,4 +175,74 @@ public void registerAttributes(ManagementResourceRegistration resourceRegistrati
157 175
         final EJBDefaultSecurityDomainWriteHandler defaultSecurityDomainWriteHandler = new EJBDefaultSecurityDomainWriteHandler(DEFAULT_SECURITY_DOMAIN, defaultSecurityDomainDeploymentProcessor);
158 176
         resourceRegistration.registerReadWriteAttribute(DEFAULT_SECURITY_DOMAIN, null, defaultSecurityDomainWriteHandler);
159 177
     }
  178
+
  179
+    @Override
  180
+    public void registerOperations(ManagementResourceRegistration subsystemRegistration) {
  181
+        super.registerOperations(subsystemRegistration);
  182
+        subsystemRegistration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
  183
+    }
  184
+
  185
+    @Override
  186
+    public void registerChildren(ManagementResourceRegistration subsystemRegistration) {
  187
+
  188
+        // subsystem=ejb3/service=remote
  189
+        subsystemRegistration.registerSubModel(EJB3RemoteResourceDefinition.INSTANCE);
  190
+
  191
+        // subsystem=ejb3/service=async
  192
+        subsystemRegistration.registerSubModel(EJB3AsyncResourceDefinition.INSTANCE);
  193
+
  194
+        // subsystem=ejb3/strict-max-bean-instance-pool=*
  195
+        subsystemRegistration.registerSubModel(StrictMaxPoolResourceDefinition.INSTANCE);
  196
+
  197
+        subsystemRegistration.registerSubModel(CacheFactoryResourceDefinition.INSTANCE);
  198
+        subsystemRegistration.registerSubModel(FilePassivationStoreResourceDefinition.INSTANCE);
  199
+        subsystemRegistration.registerSubModel(ClusterPassivationStoreResourceDefinition.INSTANCE);
  200
+
  201
+        // subsystem=ejb3/service=timerservice
  202
+        subsystemRegistration.registerSubModel(new TimerServiceResourceDefinition(pathManager));
  203
+
  204
+        // subsystem=ejb3/thread-pool=*
  205
+        subsystemRegistration.registerSubModel(UnboundedQueueThreadPoolResourceDefinition.create(EJB3SubsystemModel.THREAD_POOL,
  206
+                new EJB3ThreadFactoryResolver(), EJB3SubsystemModel.BASE_THREAD_POOL_SERVICE_NAME, registerRuntimeOnly));
  207
+
  208
+        // subsystem=ejb3/service=iiop
  209
+        subsystemRegistration.registerSubModel(EJB3IIOPResourceDefinition.INSTANCE);
  210
+    }
  211
+
  212
+    static void registerTransformers(SubsystemRegistration subsystemRegistration) {
  213
+        registerTransformers_1_1_0(subsystemRegistration);
  214
+    }
  215
+
  216
+    private static void registerTransformers_1_1_0(SubsystemRegistration subsystemRegistration) {
  217
+
  218
+        ModelVersion subsystem110 = ModelVersion.create(1, 1);
  219
+
  220
+        RejectExpressionValuesTransformer rejectTransformer = new RejectExpressionValuesTransformer(EJB3SubsystemRootResourceDefinition.ENABLE_STATISTICS);
  221
+        DiscardUndefinedAttributesTransformer discardTransformer = new DiscardUndefinedAttributesTransformer(EJB3SubsystemRootResourceDefinition.DEFAULT_SECURITY_DOMAIN);
  222
+        ChainedResourceTransformer ctr = new ChainedResourceTransformer(rejectTransformer.getChainedTransformer(), discardTransformer);
  223
+        final TransformersSubRegistration transformers110 = subsystemRegistration.registerModelTransformers(subsystem110, ctr);
  224
+        transformers110.registerOperationTransformer(ADD, new ChainedOperationTransformer(rejectTransformer, discardTransformer));
  225
+        transformers110.registerOperationTransformer(WRITE_ATTRIBUTE_OPERATION,
  226
+                new ChainedOperationTransformer(rejectTransformer.getWriteAttributeTransformer(), discardTransformer.getWriteAttributeTransformer()));
  227
+        transformers110.registerOperationTransformer(UNDEFINE_ATTRIBUTE_OPERATION, discardTransformer);
  228
+
  229
+        UnboundedQueueThreadPoolResourceDefinition.registerTransformers1_0(transformers110, EJB3SubsystemModel.THREAD_POOL);
  230
+
  231
+        StrictMaxPoolResourceDefinition.registerTransformers_1_1_0(transformers110);
  232
+        FilePassivationStoreResourceDefinition.registerTransformers_1_1_0(transformers110);
  233
+        ClusterPassivationStoreResourceDefinition.registerTransformers_1_1_0(transformers110);
  234
+        TimerServiceResourceDefinition.registerTransformers_1_1_0(transformers110);
  235
+    }
  236
+
  237
+    private static class EJB3ThreadFactoryResolver extends ThreadFactoryResolver.SimpleResolver {
  238
+
  239
+        private EJB3ThreadFactoryResolver() {
  240
+            super(ThreadsServices.FACTORY);
  241
+        }
  242
+
  243
+        @Override
  244
+        protected String getThreadGroupName(String threadPoolName) {
  245
+            return "EJB " + threadPoolName;
  246
+        }
  247
+    }
160 248
 }
12  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/FilePassivationStoreResourceDefinition.java
@@ -22,14 +22,18 @@
22 22
 
23 23
 package org.jboss.as.ejb3.subsystem;
24 24
 
  25
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION;
  26
+
25 27
 import org.jboss.as.controller.AttributeDefinition;
26  
-import org.jboss.as.controller.ReadResourceNameOperationStepHandler;
27 28
 import org.jboss.as.controller.SimpleAttributeDefinition;
28 29
 import org.jboss.as.controller.SimpleAttributeDefinitionBuilder;
  30
+import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
29 31
 import org.jboss.as.controller.operations.validation.IntRangeValidator;
30 32
 import org.jboss.as.controller.registry.AttributeAccess;
31  
-import org.jboss.as.controller.registry.ManagementResourceRegistration;
32 33
 import org.jboss.as.controller.registry.OperationEntry;
  34
+import org.jboss.as.controller.transform.RejectExpressionValuesTransformer;
  35
+import org.jboss.as.controller.transform.ResourceTransformer;
  36
+import org.jboss.as.controller.transform.TransformersSubRegistration;
33 37
 import org.jboss.as.ejb3.cache.impl.factory.NonClusteredBackingCacheEntryStoreSource;
34 38
 import org.jboss.dmr.ModelNode;
35 39
 import org.jboss.dmr.ModelType;
@@ -81,4 +85,8 @@
81 85
     private FilePassivationStoreResourceDefinition() {
82 86
         super(EJB3SubsystemModel.FILE_PASSIVATION_STORE, ADD, REMOVE, OperationEntry.Flag.RESTART_NONE, OperationEntry.Flag.RESTART_RESOURCE_SERVICES, WRITE_HANDLER, ATTRIBUTES);
83 87
     }
  88
+
  89
+    static void registerTransformers_1_1_0(TransformersSubRegistration parent) {
  90
+        PassivationStoreResourceDefinition.registerTransformers_1_1_0(INSTANCE.getPathElement(), parent);
  91
+    }
84 92
 }
16  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/PassivationStoreResourceDefinition.java
@@ -22,17 +22,25 @@
22 22
 
23 23
 package org.jboss.as.ejb3.subsystem;
24 24
 
  25
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION;
  26
+
25 27
 import org.jboss.as.controller.AttributeDefinition;
26 28
 import org.jboss.as.controller.OperationStepHandler;
27 29
 import org.jboss.as.controller.PathElement;
28 30
 import org.jboss.as.controller.SimpleAttributeDefinition;
29 31
 import org.jboss.as.controller.SimpleAttributeDefinitionBuilder;
30 32
 import org.jboss.as.controller.SimpleResourceDefinition;
  33
+import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
31 34
 import org.jboss.as.controller.operations.validation.LongRangeValidator;
32 35
 import org.jboss.as.controller.operations.validation.TimeUnitValidator;
33 36
 import org.jboss.as.controller.registry.AttributeAccess;
34 37
 import org.jboss.as.controller.registry.ManagementResourceRegistration;
35 38
 import org.jboss.as.controller.registry.OperationEntry;
  39
+import org.jboss.as.controller.transform.AddNameFromAddressResourceTransformer;
  40
+import org.jboss.as.controller.transform.RejectExpressionValuesTransformer;
  41
+import org.jboss.as.controller.transform.ResourceTransformer;
  42
+import org.jboss.as.controller.transform.TransformersSubRegistration;
  43
+import org.jboss.as.controller.transform.chained.ChainedResourceTransformer;
36 44
 import org.jboss.as.ejb3.cache.spi.BackingCacheEntryStoreConfig;
37 45
 import org.jboss.dmr.ModelNode;
38 46
 import org.jboss.dmr.ModelType;
@@ -82,4 +90,12 @@ public void registerAttributes(ManagementResourceRegistration resourceRegistrati
82 90
             resourceRegistration.registerReadWriteAttribute(definition, null, this.writeHandler);
83 91
         }
84 92
     }
  93
+
  94
+    static void registerTransformers_1_1_0(PathElement path, TransformersSubRegistration parent) {
  95
+
  96
+        RejectExpressionValuesTransformer rejectTransformer = new RejectExpressionValuesTransformer(IDLE_TIMEOUT_UNIT);
  97
+        final TransformersSubRegistration transformers110 = parent.registerSubResource(path, (ResourceTransformer) rejectTransformer);
  98
+        transformers110.registerOperationTransformer(ModelDescriptionConstants.ADD, rejectTransformer);
  99
+        transformers110.registerOperationTransformer(WRITE_ATTRIBUTE_OPERATION, rejectTransformer.getWriteAttributeTransformer());
  100
+    }
85 101
 }
17  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/StrictMaxPoolResourceDefinition.java
@@ -22,13 +22,15 @@
22 22
 
23 23
 package org.jboss.as.ejb3.subsystem;
24 24
 
  25
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
  26
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION;
  27
+
25 28
 import java.util.Collections;
26 29
 import java.util.LinkedHashMap;
27 30
 import java.util.Map;
28 31
 
29 32
 import org.jboss.as.controller.AttributeDefinition;
30 33
 import org.jboss.as.controller.PathElement;
31  
-import org.jboss.as.controller.ReadResourceNameOperationStepHandler;
32 34
 import org.jboss.as.controller.ResourceDefinition;
33 35
 import org.jboss.as.controller.SimpleAttributeDefinition;
34 36
 import org.jboss.as.controller.SimpleAttributeDefinitionBuilder;
@@ -39,6 +41,11 @@
39 41
 import org.jboss.as.controller.registry.AttributeAccess;
40 42
 import org.jboss.as.controller.registry.ManagementResourceRegistration;
41 43
 import org.jboss.as.controller.registry.OperationEntry;
  44
+import org.jboss.as.controller.transform.AddNameFromAddressResourceTransformer;
  45
+import org.jboss.as.controller.transform.RejectExpressionValuesTransformer;
  46
+import org.jboss.as.controller.transform.ResourceTransformer;
  47
+import org.jboss.as.controller.transform.TransformersSubRegistration;
  48
+import org.jboss.as.controller.transform.chained.ChainedResourceTransformer;
42 49
 import org.jboss.as.ejb3.component.pool.StrictMaxPoolConfig;
43 50
 import org.jboss.dmr.ModelNode;
44 51
 import org.jboss.dmr.ModelType;
@@ -100,4 +107,12 @@ public void registerAttributes(ManagementResourceRegistration resourceRegistrati
100 107
             resourceRegistration.registerReadWriteAttribute(attr, null, StrictMaxPoolWriteHandler.INSTANCE);
101 108
         }
102 109
     }
  110
+
  111
+    static void registerTransformers_1_1_0(TransformersSubRegistration parent) {
  112
+
  113
+        RejectExpressionValuesTransformer rejectTransformer = new RejectExpressionValuesTransformer(INSTANCE_ACQUISITION_TIMEOUT_UNIT);
  114
+        final TransformersSubRegistration transformers110 = parent.registerSubResource(INSTANCE.getPathElement(), (ResourceTransformer) rejectTransformer);
  115
+        transformers110.registerOperationTransformer(ADD, rejectTransformer);
  116
+        transformers110.registerOperationTransformer(WRITE_ATTRIBUTE_OPERATION, rejectTransformer.getWriteAttributeTransformer());
  117
+    }
103 118
 }
36  ejb3/src/main/java/org/jboss/as/ejb3/subsystem/TimerServiceResourceDefinition.java
@@ -22,6 +22,9 @@
22 22
 
23 23
 package org.jboss.as.ejb3.subsystem;
24 24
 
  25
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
  26
+import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.WRITE_ATTRIBUTE_OPERATION;
  27
+
25 28
 import java.util.Collections;
26 29
 import java.util.LinkedHashMap;
27 30
 import java.util.Map;
@@ -37,6 +40,11 @@
37 40
 import org.jboss.as.controller.registry.AttributeAccess;
38 41
 import org.jboss.as.controller.registry.ManagementResourceRegistration;
39 42
 import org.jboss.as.controller.registry.OperationEntry;
  43
+import org.jboss.as.controller.services.path.PathManager;
  44
+import org.jboss.as.controller.services.path.ResolvePathHandler;
  45
+import org.jboss.as.controller.transform.RejectExpressionValuesTransformer;
  46
+import org.jboss.as.controller.transform.ResourceTransformer;
  47
+import org.jboss.as.controller.transform.TransformersSubRegistration;
40 48
 import org.jboss.dmr.ModelType;
41 49
 
42 50
 /**
@@ -46,8 +54,6 @@
46 54
  */
47 55
 public class TimerServiceResourceDefinition extends SimpleResourceDefinition {
48 56
 
49  
-    public static final TimerServiceResourceDefinition INSTANCE = new TimerServiceResourceDefinition();
50  
-
51 57
     public static final SimpleAttributeDefinition PATH =
52 58
             new SimpleAttributeDefinitionBuilder(EJB3SubsystemModel.PATH, ModelType.STRING, true)
53 59
                     .setAllowExpression(true)
@@ -78,11 +84,14 @@
78 84
         ATTRIBUTES = Collections.unmodifiableMap(map);
79 85
     }
80 86
 
81  
-    private TimerServiceResourceDefinition() {
  87
+    private final PathManager pathManager;
  88
+
  89
+    TimerServiceResourceDefinition(PathManager pathManager) {
82 90
         super(EJB3SubsystemModel.TIMER_SERVICE_PATH,
83 91
                 EJB3Extension.getResourceDescriptionResolver(EJB3SubsystemModel.TIMER_SERVICE),
84 92
                 TimerServiceAdd.INSTANCE, TimerServiceRemove.INSTANCE,
85 93
                 OperationEntry.Flag.RESTART_ALL_SERVICES, OperationEntry.Flag.RESTART_ALL_SERVICES);
  94
+        this.pathManager = pathManager;
86 95
     }
87 96
 
88 97
     @Override
@@ -91,4 +100,25 @@ public void registerAttributes(ManagementResourceRegistration resourceRegistrati
91 100
             resourceRegistration.registerReadWriteAttribute(attr, null, new ReloadRequiredWriteAttributeHandler(attr));
92 101
         }
93 102
     }
  103
+
  104
+    @Override
  105
+    public void registerOperations(ManagementResourceRegistration resourceRegistration) {
  106
+        super.registerOperations(resourceRegistration);
  107
+        if (pathManager != null) {
  108
+            final ResolvePathHandler resolvePathHandler = ResolvePathHandler.Builder.of(pathManager)
  109
+                    .setPathAttribute(TimerServiceResourceDefinition.PATH)
  110
+                    .setRelativeToAttribute(TimerServiceResourceDefinition.RELATIVE_TO)
  111
+                    .build();
  112
+            resourceRegistration.registerOperationHandler(resolvePathHandler.getOperationDefinition(), resolvePathHandler);
  113
+        }
  114
+    }
  115
+
  116
+    static void registerTransformers_1_1_0(TransformersSubRegistration parent) {
  117
+
  118
+        RejectExpressionValuesTransformer transformer = new RejectExpressionValuesTransformer(PATH);
  119
+        final TransformersSubRegistration transformers110 = parent.registerSubResource(EJB3SubsystemModel.TIMER_SERVICE_PATH,
  120
+                (ResourceTransformer) transformer);
  121
+        transformers110.registerOperationTransformer(ADD, transformer);
  122
+        transformers110.registerOperationTransformer(WRITE_ATTRIBUTE_OPE