if(context.getRunningMode() == RunningMode.ADMIN_ONLY) { EjbLogger.ROOT_LOGGER.logInconsistentAttributeNotSupported(DEFAULT_CLUSTERED_SFSB_CACHE.getName(), DEFAULT_SFSB_CACHE); setDefaultSfsbCache = false; // don't overwrite default-sfsb-cache
@Override protected void populateModel(final OperationContext context, final ModelNode operation, final Resource resource) throws OperationFailedException { final ModelNode model = resource.getModel(); for (AttributeDefinition attr : attributes) { attr.validateAndSet(operation, model); } ConfigValidator.validateConfig(context, TransformUtils.transformModel(model)); final boolean adminOnly = context.getRunningMode() == RunningMode.ADMIN_ONLY; final boolean hostController = context.getProcessType().equals(ProcessType.HOST_CONTROLLER); // in case of unsupported configuration parameters: // in admin mode they are all logged as warning to enable fixes before migrate operation // standalone server in normal mode is shutted down with exception as it is unable to run with specified configuration // domain controller in normal mode works normally - it may send old parameters to legacy hosts - such configuration is // valid if (adminOnly || !hostController) { final List<String> unsupportedProperites = TransformUtils.validateDeprecatedProperites(model); if(!unsupportedProperites.isEmpty()) { if (adminOnly) { final String warning = JacORBLogger.ROOT_LOGGER.cannotEmulatePropertiesWarning(unsupportedProperites); JacORBLogger.ROOT_LOGGER.warn(warning); } else { throw JacORBLogger.ROOT_LOGGER.cannotEmulateProperties(unsupportedProperites); } } } }
@Override public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException { if (context.getRunningMode() != RunningMode.ADMIN_ONLY) { throw new OperationFailedException("the iiop migration can be performed when the server is in admin-only mode");
@Override protected boolean requiresRuntime(OperationContext context) { return context.getProcessType() != ProcessType.EMBEDDED_SERVER || context.getRunningMode() != RunningMode.ADMIN_ONLY; } }
@Override protected boolean requiresRuntime(OperationContext context) { return context.getProcessType() != ProcessType.EMBEDDED_SERVER || context.getRunningMode() != RunningMode.ADMIN_ONLY; } }
@Override protected boolean requiresRuntime(OperationContext context){ if (context.getProcessType() != ProcessType.HOST_CONTROLLER && context.getRunningMode() == RunningMode.ADMIN_ONLY){ return false; } return true; }
@Override protected boolean requiresRuntime(OperationContext context){ if (context.getProcessType() != ProcessType.HOST_CONTROLLER && context.getRunningMode() == RunningMode.ADMIN_ONLY){ return false; } return true; }
@Override protected boolean requiresRuntime(OperationContext context) { return context.getProcessType() != ProcessType.EMBEDDED_SERVER || context.getRunningMode() != RunningMode.ADMIN_ONLY; }
@Override protected boolean requiresRuntime(OperationContext context) { return context.getProcessType() != ProcessType.EMBEDDED_SERVER || context.getRunningMode() != RunningMode.ADMIN_ONLY; } }
@Override protected boolean requiresRuntime(OperationContext context) { return super.requiresRuntime(context) && (context.getProcessType() != ProcessType.EMBEDDED_SERVER || context.getRunningMode() != RunningMode.ADMIN_ONLY); }
@Override protected boolean requiresRuntime(OperationContext context) { return super.requiresRuntime(context) && (context.getProcessType() != ProcessType.EMBEDDED_SERVER || context.getRunningMode() != RunningMode.ADMIN_ONLY); }
@Override protected boolean requiresRuntime(OperationContext context) { return context.getProcessType() != ProcessType.EMBEDDED_HOST_CONTROLLER && (context.getProcessType() != ProcessType.EMBEDDED_SERVER && context.getRunningMode() != RunningMode.ADMIN_ONLY); }
@Override protected boolean requiresRuntime(OperationContext context) { return (context.getProcessType() != ProcessType.EMBEDDED_SERVER || context.getRunningMode() != RunningMode.ADMIN_ONLY) && (context.getProcessType() != ProcessType.EMBEDDED_HOST_CONTROLLER); } }
@Override protected boolean requiresRuntime(OperationContext context) { return context.getProcessType() != ProcessType.EMBEDDED_HOST_CONTROLLER && (context.getProcessType() != ProcessType.EMBEDDED_SERVER && context.getRunningMode() != RunningMode.ADMIN_ONLY); }
@Override protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { HttpManagementAddHandler.populateHostControllerInfo(hostControllerInfo, context, model); HttpManagementAddHandler.installHttpManagementServices(context.getRunningMode(), context.getServiceTarget(), hostControllerInfo, environment, null, false); }
@Override protected void rollbackRuntime(OperationContext context, ModelNode operation, Resource resource) { if (!context.isBooting() && context.getProcessType() == ProcessType.EMBEDDED_SERVER && context.getRunningMode() == RunningMode.ADMIN_ONLY) { context.revertReloadRequired(); } }
/** * Creates a new {@code TransformationInputs} from the given operation context. * @param context the operation context. Cannot be {@code null} */ public TransformationInputs(OperationContext context) { this.originalModel = context.readResourceFromRoot(PathAddress.EMPTY_ADDRESS, true); this.registration = context.getRootResourceRegistration(); this.processType = context.getProcessType(); this.runningMode = context.getRunningMode(); this.transformerOperationAttachment = context.getAttachment(TransformerOperationAttachment.KEY); }
@Override protected void performRuntime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { // Install another RUNTIME handler to actually install the services. This will run after the // RUNTIME handler for any child resources. Doing this will ensure that child resource handlers don't // see the installed services and can just ignore doing any RUNTIME stage work if(!context.isBooting() && context.getProcessType() == ProcessType.EMBEDDED_SERVER && context.getRunningMode() == RunningMode.ADMIN_ONLY) { context.reloadRequired(); } else { context.addStep(ServiceInstallStepHandler.INSTANCE, OperationContext.Stage.RUNTIME); } }
static void updateHttpManagementService(final OperationContext context, final ModelNode subModel, final LocalHostControllerInfoImpl hostControllerInfo, final HostControllerEnvironment environment, final ServiceVerificationHandler verificationHandler) throws OperationFailedException { HttpManagementRemoveHandler.removeHttpManagementService(context); HttpManagementAddHandler.populateHostControllerInfo(hostControllerInfo, context, subModel); HttpManagementAddHandler.installHttpManagementServices(context.getRunningMode(), context.getServiceTarget(), hostControllerInfo, environment, verificationHandler, false); }
static ResourceTransformationContext create(final OperationContext context, final TransformationTarget target, final PathAddress current, final PathAddress read) { final Resource root = Resource.Factory.create(); final Resource original = context.readResourceFromRoot(PathAddress.EMPTY_ADDRESS, true); final ImmutableManagementResourceRegistration registration = context.getRootResourceRegistration().getSubModel(PathAddress.EMPTY_ADDRESS); final ExpressionResolver expressionResolver = TransformerExpressionResolver.create(context, target.getTargetType()); final OriginalModel originalModel = new OriginalModel(original, context.getRunningMode(), context.getProcessType(), target, registration, expressionResolver); return new ResourceTransformationContextImpl(root, current, read, originalModel); }