@Override protected void populateModel(final OperationContext context, final ModelNode operation, final Resource resource) throws OperationFailedException { super.populateModel(context, operation, resource); final ModelNode model = resource.getModel(); ConfigValidator.validateConfig(context, model); }
return super.createResource(context, operation);
@Override protected void recordCapabilitiesAndRequirements(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { super.recordCapabilitiesAndRequirements(context, operation, resource); // TODO: delete these once optional requirements no longer require the existence of a capability context.registerCapability(CLUSTERED_SINGLETON_CAPABILITY); context.registerCapability(EJB_CLIENT_CONFIGURATOR); context.registerCapability(EJB_CAPABILITY); }
/** * Make any runtime changes necessary to effect the changes indicated by the given {@code operation}. Will only be * invoked if {@link OperationContext#isBooting()} returns {@code true}. Executes * after {@link #populateModel(org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)}, so the given {@code resource} * parameter will reflect any changes made in that method. This method is * invoked during {@link org.jboss.as.controller.OperationContext.Stage#RUNTIME}. Subclasses that wish to make * changes to runtime services should override this method or the * {@link #performBoottime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)} variant. * <p> * This default implementation simply calls the * {@link #performBoottime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)} variant. * <strong>Subclasses that override this method should not call{@code super.performBoottime(...)}.</strong> * * @param context the operation context * @param operation the operation being executed * @param resource persistent configuration resource that corresponds to the address of {@code operation} * @throws OperationFailedException if {@code operation} is invalid or updating the runtime otherwise fails */ protected void performBoottime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { performBoottime(context, operation, resource.getModel()); }
/** * Overrides the superclass to call {@link OperationContext#revertReloadRequired()} * if {@link OperationContext#isBooting()} returns {@code false}. * * {@inheritDoc} */ @Override protected void rollbackRuntime(OperationContext context, ModelNode operation, Resource resource) { revertReload(context); }
@Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { super.performRuntime(context, operation, model, verificationHandler, newControllers); }
/** * Make any runtime changes necessary to effect the changes indicated by the given {@code operation}. Will only be * invoked if {@link OperationContext#isBooting()} returns {@code true}. Executes * after {@link #populateModel(org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)}, so the given {@code resource} * parameter will reflect any changes made in that method. This method is * invoked during {@link org.jboss.as.controller.OperationContext.Stage#RUNTIME}. Subclasses that wish to make * changes to runtime services should override this method or the * {@link #performBoottime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)} variant. * <p> * This default implementation simply calls the * {@link #performBoottime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode)} variant. * <strong>Subclasses that override this method should not call{@code super.performBoottime(...)}.</strong> * * @param context the operation context * @param operation the operation being executed * @param resource persistent configuration resource that corresponds to the address of {@code operation} * @throws OperationFailedException if {@code operation} is invalid or updating the runtime otherwise fails */ protected void performBoottime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { performBoottime(context, operation, resource.getModel()); }
/** * Overrides the superclass to call {@link OperationContext#revertReloadRequired()} * if {@link OperationContext#isBooting()} returns {@code false}. * * {@inheritDoc} */ @Override protected void rollbackRuntime(OperationContext context, ModelNode operation, Resource resource) { revertReload(context); }
/** * If {@link OperationContext#isBooting()} returns {@code true}, invokes * {@link #performBoottime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode, ServiceVerificationHandler, java.util.List)}, * else invokes {@link OperationContext#reloadRequired()}. */ @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { if (context.isBooting()) { performBoottime(context, operation, model, verificationHandler, newControllers); } else { context.reloadRequired(); } }
@Override protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { Version.getVersion(); super.populateModel(operation, model); }
return super.createResource(context, operation);
/** * <strong>Deprecated</strong>. Overrides the superclass to call {@link OperationContext#revertReloadRequired()} * if {@link OperationContext#isBooting()} returns {@code false}. * * {@inheritDoc} */ @Deprecated @Override @SuppressWarnings("deprecation") protected void rollbackRuntime(OperationContext context, ModelNode operation, ModelNode model, List<ServiceController<?>> controllers) { revertReload(context); }
/** * If {@link OperationContext#isBooting()} returns {@code true}, invokes * {@link #performBoottime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.dmr.ModelNode, ServiceVerificationHandler, java.util.List)}, * else invokes {@link OperationContext#reloadRequired()}. */ @Override protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { if (context.isBooting()) { performBoottime(context, operation, model, verificationHandler, newControllers); } else { context.reloadRequired(); } }
@Override protected void populateModel(final OperationContext context, final ModelNode operation, final Resource resource) throws OperationFailedException { super.populateModel(context, operation, resource); final ModelNode model = resource.getModel(); ConfigValidator.validateConfig(context, model); }
/** * <strong>Deprecated</strong>. Overrides the superclass to call {@link OperationContext#revertReloadRequired()} * if {@link OperationContext#isBooting()} returns {@code false}. * * {@inheritDoc} */ @Deprecated @Override @SuppressWarnings("deprecation") protected void rollbackRuntime(OperationContext context, ModelNode operation, ModelNode model, List<ServiceController<?>> controllers) { revertReload(context); }
/** * If {@link OperationContext#isBooting()} returns {@code true}, invokes * {@link #performBoottime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}, * else invokes {@link OperationContext#reloadRequired()}. * * {@inheritDoc} */ @Override protected final void performRuntime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { if (context.isBooting()) { performBoottime(context, operation, resource); } else { context.reloadRequired(); } }
@Override protected void populateModel(final OperationContext context, final ModelNode operation, final Resource resource) throws OperationFailedException { super.populateModel(context, operation, resource); final ModelNode model = resource.getModel(); ConfigValidator.validateConfig(context, model); }
/** * If {@link OperationContext#isBooting()} returns {@code true}, invokes * {@link #performBoottime(OperationContext, org.jboss.dmr.ModelNode, org.jboss.as.controller.registry.Resource)}, * else invokes {@link OperationContext#reloadRequired()}. * * {@inheritDoc} */ @Override protected final void performRuntime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException { if (context.isBooting()) { performBoottime(context, operation, resource); } else { context.reloadRequired(); } }