private void revertBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel, String attributeName, ModelNode previousValue) { context.removeService(SOCKET_BINDING.append(bindingName)); ModelNode unresolvedConfig = bindingModel.clone(); unresolvedConfig.get(attributeName).set(previousValue); try { BindingAddHandler.installBindingService(context, unresolvedConfig, bindingName, null); } catch (Exception e) { // Bizarro, as we installed the service before throw new RuntimeException(e); } }
private void revertBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel, String attributeName, ModelNode previousValue) { context.removeService(SOCKET_BINDING.append(bindingName)); ModelNode unresolvedConfig = bindingModel.clone(); unresolvedConfig.get(attributeName).set(previousValue); try { BindingAddHandler.installBindingService(context, unresolvedConfig, bindingName, null); } catch (Exception e) { // Bizarro, as we installed the service before throw new RuntimeException(e); } }
private void handleBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel) throws OperationFailedException { context.removeService(SOCKET_BINDING.append(bindingName)); try { BindingAddHandler.installBindingService(context, bindingModel, bindingName, null); } catch (UnknownHostException e) { throw new OperationFailedException(new ModelNode().set(e.toString())); } }
private void handleBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel) throws OperationFailedException { context.removeService(SOCKET_BINDING.append(bindingName)); try { BindingAddHandler.installBindingService(context, bindingModel, bindingName, null); } catch (UnknownHostException e) { throw new OperationFailedException(new ModelNode().set(e.toString())); } }
private void revertBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel, String attributeName, ModelNode previousValue) { final ServiceName serviceName = SOCKET_BINDING_CAPABILITY.getCapabilityServiceName(bindingName, SocketBinding.class); context.removeService(serviceName); ModelNode unresolvedConfig = bindingModel.clone(); unresolvedConfig.get(attributeName).set(previousValue); try { BindingAddHandler.installBindingService(context, unresolvedConfig, bindingName); } catch (Exception e) { // Bizarro, as we installed the service before throw new RuntimeException(e); } }
private void revertBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel, String attributeName, ModelNode previousValue) { final ServiceName serviceName = SOCKET_BINDING_CAPABILITY.getCapabilityServiceName(bindingName, SocketBinding.class); context.removeService(serviceName); ModelNode unresolvedConfig = bindingModel.clone(); unresolvedConfig.get(attributeName).set(previousValue); try { BindingAddHandler.installBindingService(context, unresolvedConfig, bindingName); } catch (Exception e) { // Bizarro, as we installed the service before throw new RuntimeException(e); } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); String name = address.getLastElement().getValue(); try { newControllers.add(installBindingService(context, model, name, verificationHandler)); } catch (UnknownHostException e) { throw new OperationFailedException(new ModelNode().set(e.getLocalizedMessage())); } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); String name = address.getLastElement().getValue(); try { newControllers.add(installBindingService(context, model, name, verificationHandler)); } catch (UnknownHostException e) { throw new OperationFailedException(new ModelNode().set(e.getLocalizedMessage())); } }
private void handleBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel, ServiceName serviceName) throws OperationFailedException { context.removeService(serviceName); try { BindingAddHandler.installBindingService(context, bindingModel, bindingName); } catch (UnknownHostException e) { throw new OperationFailedException(e.toString()); } }
private void handleBindingReinstall(OperationContext context, String bindingName, ModelNode bindingModel, ServiceName serviceName) throws OperationFailedException { context.removeService(serviceName); try { BindingAddHandler.installBindingService(context, bindingModel, bindingName); } catch (UnknownHostException e) { throw new OperationFailedException(e.toString()); } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); String name = address.getLastElement().getValue(); try { installBindingService(context, model, name); } catch (UnknownHostException e) { throw new OperationFailedException(e.toString()); } }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); String name = address.getLastElement().getValue(); try { installBindingService(context, model, name); } catch (UnknownHostException e) { throw new OperationFailedException(e.toString()); } }
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR)); String name = address.getLastElement().getValue(); ServiceName svcName = SocketBinding.JBOSS_BINDING_NAME.append(name); ServiceRegistry registry = context.getServiceRegistry(true); ServiceController<?> controller = registry.getService(svcName); if (controller != null) { // We didn't remove it, we just set reloadRequired context.revertReloadRequired(); } else { try { BindingAddHandler.installBindingService(context, model, name, null); }catch (UnknownHostException e) { throw new OperationFailedException(new ModelNode().set(e.toString())); } } } }
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR)); String name = address.getLastElement().getValue(); ServiceName svcName = SocketBinding.JBOSS_BINDING_NAME.append(name); ServiceRegistry registry = context.getServiceRegistry(true); ServiceController<?> controller = registry.getService(svcName); if (controller != null) { // We didn't remove it, we just set reloadRequired context.revertReloadRequired(); } else { try { BindingAddHandler.installBindingService(context, model, name, null); }catch (UnknownHostException e) { throw new OperationFailedException(new ModelNode().set(e.toString())); } } } }
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { String name = context.getCurrentAddressValue(); ServiceName svcName = SOCKET_BINDING_CAPABILITY.getCapabilityServiceName(name); ServiceRegistry registry = context.getServiceRegistry(true); ServiceController<?> controller = registry.getService(svcName); if (controller != null) { // We didn't remove it, we just set reloadRequired context.revertReloadRequired(); } else { try { BindingAddHandler.installBindingService(context, model, name); }catch (UnknownHostException e) { throw new OperationFailedException(e.toString()); } } } }
protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { String name = context.getCurrentAddressValue(); ServiceName svcName = SOCKET_BINDING_CAPABILITY.getCapabilityServiceName(name); ServiceRegistry registry = context.getServiceRegistry(true); ServiceController<?> controller = registry.getService(svcName); if (controller != null) { // We didn't remove it, we just set reloadRequired context.revertReloadRequired(); } else { try { BindingAddHandler.installBindingService(context, model, name); }catch (UnknownHostException e) { throw new OperationFailedException(e.toString()); } } } }