Refine search
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { OperationStepHandler writeHandler = new ReloadRequiredWriteAttributeHandler(ATTRIBUTES); for (AttributeDefinition attr : ATTRIBUTES) { resourceRegistration.registerReadWriteAttribute(attr, null, writeHandler); } } }
@Override protected void finishModelStage(final OperationContext context, final ModelNode operation, final String attributeName, final ModelNode newValue, ModelNode oldValue, Resource model) throws OperationFailedException { // Make sure that security=on becomes security=identity if (attributeName.equals(JacORBSubsystemConstants.ORB_INIT_SECURITY) && newValue.asString().equals(JacORBSubsystemConstants.ON)) { newValue.set(JacORBSubsystemConstants.IDENTITY); } super.finishModelStage(context, operation, attributeName, newValue, oldValue, model); } }
@Override protected void validateUpdatedModel(OperationContext context, Resource model) throws OperationFailedException { super.validateUpdatedModel(context, model); context.addStep(JdbcStoreValidationStep.INSTANCE, OperationContext.Stage.MODEL); } }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { for (final AttributeDefinition attribute : CommonAttributes.RESOURCE_ADAPTER_ATTRIBUTE) { if (readOnly) { resourceRegistration.registerReadOnlyAttribute(attribute, null); } else { resourceRegistration.registerReadWriteAttribute(attribute, null, new ReloadRequiredWriteAttributeHandler(attribute)); } } }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { knownApplicationSecurityDomains.clear(); ReloadRequiredWriteAttributeHandler handler = new ReloadRequiredWriteAttributeHandler(ATTRIBUTES); for (AttributeDefinition attribute: ATTRIBUTES) { resourceRegistration.registerReadWriteAttribute(attribute, null, handler); } if (resourceRegistration.getProcessType().isServer()) { resourceRegistration.registerReadOnlyAttribute(REFERENCING_DEPLOYMENTS, new ReferencingDeploymentsHandler()); } }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { // DO NOT call super, as we need non-standard handling for enabled Collection<AttributeDefinition> ads = getAttributes(); OperationStepHandler rrh = new ReloadRequiredWriteAttributeHandler(ads); // we include ENABLED in this set, but it doesn't matter we don't register rrh for it OperationStepHandler enh = new EnabledAttributeHandler(); for (AttributeDefinition ad : ads) { OperationStepHandler osh = ad == ENABLED ? enh : rrh; resourceRegistration.registerReadWriteAttribute(ad, null, osh); } for(ConnectorStat attr : ConnectorStat.values()) { resourceRegistration.registerMetric(attr.definition, ReadStatisticHandler.INSTANCE); } }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { super.registerAttributes(resourceRegistration); ReloadRequiredWriteAttributeHandler handler = new ReloadRequiredWriteAttributeHandler(getAttributes()); for (AttributeDefinition attr : getAttributes()) { if(!attr.getImmutableFlags().contains(AttributeAccess.Flag.RESTART_ALL_SERVICES)) { throw ControllerLogger.ROOT_LOGGER.attributeWasNotMarkedAsReloadRequired(attr.getName(), resourceRegistration.getPathAddress()); } resourceRegistration.registerReadWriteAttribute(attr, null, handler); } }
@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, HandbackHolder<Void> handback) throws OperationFailedException { boolean updated = super.applyUpdateToRuntime(context, operation, attributeName, resolvedValue, currentValue, handback); if (updated) { PathAddress address = context.getCurrentAddress(); if (context.isResourceServiceRestartAllowed() && this.getAttributeDefinition(attributeName).getFlags().contains(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) && context.markResourceRestarted(address, this.handler)) { this.restartServices(context); // Returning false prevents going into reload required state return false; } } return updated; }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { for (final AttributeDefinition attribute : CommonAttributes.ADMIN_OBJECTS_NODE_ATTRIBUTE) { if (readOnly) { resourceRegistration.registerReadOnlyAttribute(attribute, null); } else { resourceRegistration.registerReadWriteAttribute(attribute, null, new ReloadRequiredWriteAttributeHandler(attribute)); } } }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { ReloadRequiredWriteAttributeHandler handler = new ReloadRequiredWriteAttributeHandler(getAttributes()); for (AttributeDefinition attributeDefinition : getAttributes()) { OperationStepHandler writeHandler = handler; if (attributeDefinition == STATISTICS_ENABLED_ATTRIBUTE) { writeHandler = AbstractDataSourceOperations.STATISTICS_ENABLED_WRITE_OPERATION; } if (attributeDefinition == CONNECTION_FACTORY_ATTRIBUTE) { writeHandler = AbstractDataSourceOperations.CONNECTION_FACTORY_WRITE_OPERATION; } if (attributeDefinition == CONNECTION_POOL_ATTRIBUTE) { writeHandler = AbstractDataSourceOperations.CONNECTION_POOL_WRITE_OPERATION; } resourceRegistration.registerReadWriteAttribute(attributeDefinition, null, writeHandler); } // Runtime attributes if (resourceRegistration.getProcessType().isServer()) { resourceRegistration.registerReadOnlyAttribute(STATISTICS, AbstractDataSourceOperations.STATISTICS_GET_OPERATION); } }
@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, org.jboss.as.controller.AbstractWriteAttributeHandler.HandbackHolder<Void> voidHandback) throws OperationFailedException { if (CommonAttributes.FACTORY_CLASS.getName().equals(attributeName)) { checkFactoryClass(resolvedValue.asString()); } return super.applyUpdateToRuntime(context, operation, attributeName, resolvedValue, currentValue, voidHandback); } }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { OperationStepHandler writeHandler = new ReloadRequiredWriteAttributeHandler(ATTRIBUTES); for (AttributeDefinition attr : ATTRIBUTES) { resourceRegistration.registerReadWriteAttribute(attr, null, writeHandler); } } }
/** * {@inheritDoc} */ @Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { ReloadRequiredWriteAttributeHandler reloadWrtiteHandler = new ReloadRequiredWriteAttributeHandler(JNDI_NAME, CM_TABLE_NAME, CM_TABLE_BATCH_SIZE, CM_TABLE_IMMEDIATE_CLEANUP); resourceRegistration.registerReadWriteAttribute(CM_TABLE_NAME, null, reloadWrtiteHandler); resourceRegistration.registerReadWriteAttribute(CM_TABLE_BATCH_SIZE, null, reloadWrtiteHandler); resourceRegistration.registerReadWriteAttribute(CM_TABLE_IMMEDIATE_CLEANUP, null, reloadWrtiteHandler); //This comes from the address resourceRegistration.registerReadOnlyAttribute(JNDI_NAME, ReadResourceNameOperationStepHandler.INSTANCE); } }
@Override protected void finishModelStage(OperationContext context, ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, Resource model) throws OperationFailedException { super.finishModelStage(context, operation, attributeName, newValue, oldValue, model); context.addResponseWarning(Level.WARNING, UndertowLogger.ROOT_LOGGER.workerValueInHTTPListenerMustMatchRemoting()); }
@Override protected void validateUpdatedModel(final OperationContext context, final Resource model) throws OperationFailedException { context.addStep(ExecutorQueueValidationStepHandler.MODEL_VALIDATION_INSTANCE, OperationContext.Stage.MODEL); super.validateUpdatedModel(context, model); } }
@Override protected boolean applyUpdateToRuntime(OperationContext context, ModelNode operation, String attributeName, ModelNode resolvedValue, ModelNode currentValue, org.jboss.as.controller.AbstractWriteAttributeHandler.HandbackHolder<Void> voidHandback) throws OperationFailedException { if (CommonAttributes.FACTORY_CLASS.getName().equals(attributeName)) { checkFactoryClass(resolvedValue.asString()); } return super.applyUpdateToRuntime(context, operation, attributeName, resolvedValue, currentValue, voidHandback); } }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { ReloadRequiredWriteAttributeHandler handler = new ReloadRequiredWriteAttributeHandler(ATTRIBUTES); for (AttributeDefinition attribute: ATTRIBUTES) { resourceRegistration.registerReadWriteAttribute(attribute, null, handler); } } }
@Override public void registerAttributes(ManagementResourceRegistration resourceRegistration) { for (final AttributeDefinition attribute : CommonAttributes.CONNECTION_DEFINITIONS_NODE_ATTRIBUTE) { if (readOnly) { resourceRegistration.registerReadOnlyAttribute(attribute, null); } else { if (PoolConfigurationRWHandler.ATTRIBUTES.contains(attribute.getName())) { resourceRegistration.registerReadWriteAttribute(attribute, null, PoolConfigurationRWHandler.RaPoolConfigurationWriteHandler.INSTANCE); } else if (attribute.equals(ENLISTMENT_TRACE)) { resourceRegistration.registerReadWriteAttribute(attribute, null, new EnlistmentTraceAttributeWriteHandler()); } else { resourceRegistration.registerReadWriteAttribute(attribute, null, new ReloadRequiredWriteAttributeHandler(attribute)); } } } }
@Override protected void finishModelStage(final OperationContext context, final ModelNode operation, String attributeName, ModelNode newValue, ModelNode oldValue, final Resource model) throws OperationFailedException { super.finishModelStage(context, operation, attributeName, newValue, oldValue, model); assert !USE_JOURNAL_STORE.isAllowExpression() && !USE_JDBC_STORE.isAllowExpression() : "rework this before enabling expression"; if (attributeName.equals(USE_JOURNAL_STORE.getName()) || attributeName.equals(USE_JDBC_STORE.getName())) { if (newValue.isDefined() && newValue.asBoolean()) { // check the value of the mutual attribute and disable it if it is set to true final String mutualAttributeName = attributeName.equals(USE_JDBC_STORE.getName()) ? USE_JOURNAL_STORE.getName() : USE_JDBC_STORE.getName(); ModelNode resourceModel = model.getModel(); if (resourceModel.hasDefined(mutualAttributeName) && resourceModel.get(mutualAttributeName).asBoolean()) { resourceModel.get(mutualAttributeName).set(new ModelNode(false)); } } } context.addStep(JdbcStoreValidationStep.INSTANCE, OperationContext.Stage.MODEL); } }
@Override protected void validateUpdatedModel(OperationContext context, Resource model) throws OperationFailedException { super.validateUpdatedModel(context, model); context.addStep(VALIDATE_RESOURCE_MODEL_OPERATION_STEP_HANDLER, OperationContext.Stage.MODEL); } }