Source:
<code>protected void recordCapabilitiesAndRequirements(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { ModelNode model = resource.getModel(); if (model.hasDefined(DEFAULT_SLSB_INSTANCE_POOL)) { context.registerCapability(DEFAULT_SLSB_POOL_CONFIG_CAPABILITY); <START> String resolvedDefaultSLSBPoolName = context.resolveExpressions(model.get(DEFAULT_SLSB_INSTANCE_POOL)).asString(); <END> String defaultSLSBPoolRequirementName = RuntimeCapability.buildDynamicCapabilityName(STRICT_MAX_POOL_CONFIG_CAPABILITY_NAME, resolvedDefaultSLSBPoolName); context.registerAdditionalCapabilityRequirement(defaultSLSBPoolRequirementName, DEFAULT_SLSB_POOL_CONFIG_CAPABILITY_NAME, DEFAULT_SLSB_INSTANCE_POOL); } if (model.hasDefined(DEFAULT_MDB_INSTANCE_POOL)) { context.registerCapability(DEFAULT_MDB_POOL_CONFIG_CAPABILITY); String resolvedDefaultMDBPoolName = context.resolveExpressions(model.get(DEFAULT_MDB_INSTANCE_POOL)).asString(); String defaultMDBPoolRequirementName = RuntimeCapability.buildDynamicCapabilityName(STRICT_MAX_POOL_CONFIG_CAPABILITY_NAME, resolvedDefaultMDBPoolName); context.registerAdditionalCapabilityRequirement(defaultMDBPoolRequirementName, DEFAULT_MDB_POOL_CONFIG_CAPABILITY_NAME, DEFAULT_MDB_INSTANCE_POOL); } super.recordCapabilitiesAndRequirements(context, operation, resource); }</code><technical_language>unfortunate this attribute allows expressions. This runs in Stage.MODEL some expressions (typically legacy security vault ones) resolvable Stage.RUNTIME. is big reason avoid allow expressions for model reference attributes. this forever, is is. safe L236-238 in a try/catch logs a WARN if resolvesExpressions throws OperationFailedException. record requirement</technical_language>

Target:
protected void recordCapabilitiesAndRequirements(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { ModelNode model = resource.getModel(); if (model.hasDefined(DEFAULT_SLSB_INSTANCE_POOL)) { context.registerCapability(DEFAULT_SLSB_POOL_CONFIG_CAPABILITY); try { String resolvedDefaultSLSBPoolName = context.resolveExpressions(model.get(DEFAULT_SLSB_INSTANCE_POOL)).asString(); String defaultSLSBPoolRequirementName = RuntimeCapability.buildDynamicCapabilityName(STRICT_MAX_POOL_CONFIG_CAPABILITY_NAME, resolvedDefaultSLSBPoolName); context.registerAdditionalCapabilityRequirement(defaultSLSBPoolRequirementName, DEFAULT_SLSB_POOL_CONFIG_CAPABILITY_NAME, DEFAULT_SLSB_INSTANCE_POOL); } catch (OperationFailedException ofe) { EjbLogger.ROOT_LOGGER.defaultPoolExpressionCouldNotBeResolved(DEFAULT_SLSB_INSTANCE_POOL, model.get(DEFAULT_SLSB_INSTANCE_POOL).asString()); } } if (model.hasDefined(DEFAULT_MDB_INSTANCE_POOL)) { context.registerCapability(DEFAULT_MDB_POOL_CONFIG_CAPABILITY); try { String resolvedDefaultMDBPoolName = context.resolveExpressions(model.get(DEFAULT_MDB_INSTANCE_POOL)).asString(); String defaultMDBPoolRequirementName = RuntimeCapability.buildDynamicCapabilityName(STRICT_MAX_POOL_CONFIG_CAPABILITY_NAME, resolvedDefaultMDBPoolName); context.registerAdditionalCapabilityRequirement(defaultMDBPoolRequirementName, DEFAULT_MDB_POOL_CONFIG_CAPABILITY_NAME, DEFAULT_MDB_INSTANCE_POOL); } catch(OperationFailedException ofe) { EjbLogger.ROOT_LOGGER.defaultPoolExpressionCouldNotBeResolved(DEFAULT_MDB_INSTANCE_POOL, model.get(DEFAULT_MDB_INSTANCE_POOL).asString()); } } super.recordCapabilitiesAndRequirements(context, operation, resource); }