@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { // This subsystem registers DUPs, so we can't remove it from the runtime without a reload context.reloadRequired(); }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { // This subsystem registers DUPs, so we can't remove it from the runtime without a reload context.reloadRequired(); }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) { context.reloadRequired(); }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) { context.reloadRequired(); }
@Override public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException { context.reloadRequired(); context.completeStep(OperationContext.RollbackHandler.REVERT_RELOAD_REQUIRED_ROLLBACK_HANDLER); } }, OperationContext.Stage.RUNTIME);
@Override public void execute(OperationContext operationContext, ModelNode modelNode) throws OperationFailedException { context.reloadRequired(); context.completeStep(new OperationContext.RollbackHandler() { @Override public void handleRollback(OperationContext operationContext, ModelNode modelNode) { context.revertReloadRequired(); } }); } }, OperationContext.Stage.RUNTIME);
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { this.handler.removeServices(context, model); } else { context.reloadRequired(); } }
@Override protected final void performRuntime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { if (context.isBooting()) { context.addStep(new DeploymentChainStep(this.deploymentChainContributor), OperationContext.Stage.RUNTIME); super.performRuntime(context, operation, resource); } else { context.reloadRequired(); } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { final ModelNode address = operation.require(OP_ADDR); final PathAddress path = PathAddress.pathAddress(address); final String jndiName = path.getElement(path.size() - 2).getValue(); final String configPropertyName = PathAddress.pathAddress(address).getLastElement().getValue(); ServiceName configPropertyServiceName = XADataSourceConfigService.SERVICE_NAME_BASE.append(jndiName). append("xa-datasource-properties").append(configPropertyName); context.removeService(configPropertyServiceName); } else { context.reloadRequired(); } } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { final ModelNode address = operation.require(OP_ADDR); final PathAddress path = PathAddress.pathAddress(address); final String jndiName = path.getElement(path.size() - 2).getValue(); final String configPropertyName = PathAddress.pathAddress(address).getLastElement().getValue(); ServiceName configPropertyServiceName = DataSourceConfigService.SERVICE_NAME_BASE.append(jndiName) .append("connection-properties").append(configPropertyName); context.removeService(configPropertyServiceName); } else { context.reloadRequired(); } } }
/** * {@inheritDoc} */ @Override protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); final String jndiName = address.getLastElement().getValue(); final String tableName = CMResourceResourceDefinition.CM_TABLE_NAME.resolveModelAttribute(context, model).asString(); final int batchSize = CMResourceResourceDefinition.CM_TABLE_BATCH_SIZE.resolveModelAttribute(context, model).asInt(); final boolean immediateCleanup = CMResourceResourceDefinition.CM_TABLE_IMMEDIATE_CLEANUP.resolveModelAttribute(context, model).asBoolean(); ROOT_LOGGER.debugf("adding commit-markable-resource: jndi-name=%s, table-name=%s, batch-size=%d, immediate-cleanup=%b", jndiName, tableName, batchSize, immediateCleanup); CMResourceService service = new CMResourceService(jndiName, tableName, immediateCleanup, batchSize); context.getServiceTarget().addService(TxnServices.JBOSS_TXN_CMR.append(jndiName), service) .addDependency(TxnServices.JBOSS_TXN_JTA_ENVIRONMENT, JTAEnvironmentBean.class, service.getJTAEnvironmentBeanInjector()) .setInitialMode(ServiceController.Mode.ACTIVE) .install(); if (!context.isBooting()) { context.reloadRequired(); } } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode recoveryEnvModel) throws OperationFailedException { final String configPropertyValue = CONNECTION_PROPERTY_VALUE.resolveModelAttribute(context, recoveryEnvModel).asString(); final ModelNode address = operation.require(OP_ADDR); PathAddress path = PathAddress.pathAddress(address); final String jndiName = path.getElement(path.size() - 2).getValue(); final String configPropertyName = PathAddress.pathAddress(address).getLastElement().getValue(); ServiceName serviceName = DataSourceConfigService.SERVICE_NAME_BASE.append(jndiName).append("connection-properties").append(configPropertyName); final ServiceRegistry registry = context.getServiceRegistry(true); final ServiceName dataSourceConfigServiceName = DataSourceConfigService.SERVICE_NAME_BASE .append(jndiName); final ServiceController<?> dataSourceConfigController = registry .getService(dataSourceConfigServiceName); if (dataSourceConfigController == null || !((DataSource) dataSourceConfigController.getValue()).isEnabled()) { final ServiceTarget serviceTarget = context.getServiceTarget(); final ConnectionPropertiesService service = new ConnectionPropertiesService(configPropertyName, configPropertyValue); serviceTarget.addService(serviceName, service).setInitialMode(ServiceController.Mode.NEVER) .install(); } else { context.reloadRequired(); } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode recoveryEnvModel) throws OperationFailedException { final String configPropertyValue = XADATASOURCE_PROPERTY_VALUE.resolveModelAttribute(context, recoveryEnvModel).asString(); final ModelNode address = operation.require(OP_ADDR); PathAddress path = PathAddress.pathAddress(address); final String dsName = path.getElement(path.size() - 2).getValue(); final String configPropertyName = PathAddress.pathAddress(address).getLastElement().getValue(); ServiceName serviceName = XADataSourceConfigService.SERVICE_NAME_BASE.append(dsName).append("xa-datasource-properties").append(configPropertyName); final ServiceRegistry registry = context.getServiceRegistry(true); final ServiceName dataSourceConfigServiceName = XADataSourceConfigService.SERVICE_NAME_BASE .append(dsName); final ServiceController<?> dataSourceConfigController = registry .getService(dataSourceConfigServiceName); if (dataSourceConfigController == null || !((XaDataSource) dataSourceConfigController.getValue()).isEnabled()) { final ServiceTarget serviceTarget = context.getServiceTarget(); final XaDataSourcePropertiesService service = new XaDataSourcePropertiesService(configPropertyName, configPropertyValue); ServiceController<?> controller = serviceTarget.addService(serviceName, service).setInitialMode(ServiceController.Mode.NEVER) .install(); } else { context.reloadRequired(); } }
context.reloadRequired();
ctx.reloadRequired(); ctx.completeStep(OperationContext.RollbackHandler.REVERT_RELOAD_REQUIRED_ROLLBACK_HANDLER); }, OperationContext.Stage.RUNTIME);
context.reloadRequired(); context.completeStep(new OperationContext.RollbackHandler() { @Override
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { // This subsystem registers DUPs, so we can't remove it from the runtime without a reload context.reloadRequired(); }
@Override protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { super.performRemove(context, operation, model); context.reloadRequired(); } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { removeRuntimeService(context, operation); } else { context.reloadRequired(); } }
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) { String name = context.getCurrentAddressValue(); ServiceName svcName = SOCKET_BINDING_CAPABILITY.getCapabilityServiceName(name); ServiceRegistry registry = context.getServiceRegistry(true); ServiceController<?> controller = registry.getService(svcName); ServiceController.State state = controller == null ? null : controller.getState(); if (!context.isResourceServiceRestartAllowed() || (state == ServiceController.State.UP)) { context.reloadRequired(); } else { context.removeService(svcName); } }