Java Code Examples for org.jboss.as.controller.OperationContext#isResourceServiceRestartAllowed()
The following examples show how to use
org.jboss.as.controller.OperationContext#isResourceServiceRestartAllowed() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JaspiDefinition.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { removeRegistration(context); } else { context.reloadRequired(); } }
Example 2
Source File: JaspiDefinition.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
@Override protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { ADD.performRuntime(context, operation, model); } else { context.revertReloadRequired(); } }
Example 3
Source File: ElytronDefinition.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { registerAuthConfigFactory(null); SecurityPropertyService securityPropertyService = uninstallSecurityPropertyService(context); if (securityPropertyService != null) { context.attach(SECURITY_PROPERTY_SERVICE_KEY, securityPropertyService); } context.removeService(ProviderRegistrationService.SERVICE_NAME); } else { context.reloadRequired(); } }
Example 4
Source File: DomainDefinition.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) { super.performRuntime(context, operation, model); if (context.isResourceServiceRestartAllowed()) { final PathAddress address = context.getCurrentAddress(); final String name = address.getLastElement().getValue(); context.removeService(serviceName(name, address).append(INITIAL)); } }
Example 5
Source File: JMXSubsystemRemove.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
private boolean isRemoveService(OperationContext context) { if (context.isNormalServer()) { if (context.isResourceServiceRestartAllowed()) { context.removeService(MBeanServerService.SERVICE_NAME); return true; } } return false; }
Example 6
Source File: BindingRemoveHandler.java From wildfly-core with GNU Lesser General Public License v2.1 | 5 votes |
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); } }
Example 7
Source File: ManagementUtil.java From wildfly-core with GNU Lesser General Public License v2.1 | 4 votes |
static boolean isSecurityRealmReloadRequired(final OperationContext context, final ServiceController<?> controller) { final ServiceController.State state = controller == null ? null : controller.getState(); return state == ServiceController.State.UP && !context.isResourceServiceRestartAllowed(); }