Package org.jboss.as.controller

Examples of org.jboss.as.controller.ServiceVerificationHandler


            super.execute(context, operation);
            if (requiresRuntime(context)) {
                context.addStep(new OperationStepHandler() {
                    public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
                        final List<ServiceController<?>> controllers = new ArrayList<ServiceController<?>>();
                        final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
                        performRuntime(context, operation, operation, verificationHandler, controllers);

                        context.addStep(verificationHandler, OperationContext.Stage.VERIFY);

                        context.completeStep(new OperationContext.RollbackHandler() {
View Full Code Here


        context.removeService(commonHostName);
    }

    protected void recoverServices(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
        if (context.isResourceServiceRestartAllowed()) {
            HostAdd.INSTANCE.performRuntime(context, operation, model, new ServiceVerificationHandler(), new ArrayList<ServiceController<?>>());
        } else {
            context.revertReloadRequired();
        }
    }
View Full Code Here

    protected void addJndiBinding(final EEModuleConfiguration module, final BindingConfiguration bindingConfiguration, final DeploymentPhaseContext phaseContext, final List<ServiceName> dependencies) throws DeploymentUnitProcessingException {
        // Gather information about the dependency
        final String bindingName = bindingConfiguration.getName().startsWith("java:") ? bindingConfiguration.getName() : "java:module/env/" + bindingConfiguration.getName();

        final ServiceVerificationHandler serviceVerificationHandler = phaseContext.getDeploymentUnit().getAttachment(org.jboss.as.server.deployment.Attachments.SERVICE_VERIFICATION_HANDLER);

        InjectionSource.ResolutionContext resolutionContext = new InjectionSource.ResolutionContext(
                true,
                module.getModuleName(),
                module.getModuleName(),
View Full Code Here

        final PathAddress containerAddress = cacheAddress.subAddress(0, cacheAddress.size()-1) ;
        ModelNode containerModel = context.readResourceFromRoot(containerAddress).getModel();

        // re-add the services if the remove failed
        String cacheType = getCacheType(operation) ;
        ServiceVerificationHandler verificationHandler = null ;

        if (cacheType.equals(ModelKeys.LOCAL_CACHE)) {
            LocalCacheAdd.INSTANCE.installRuntimeServices(context, operation, containerModel, cacheModel, verificationHandler);
        } else if (cacheType.equals(ModelKeys.INVALIDATION_CACHE)) {
            InvalidationCacheAdd.INSTANCE.installRuntimeServices(context, operation, containerModel, cacheModel, verificationHandler);
View Full Code Here

            if(! newValue.equals(currentValue)) {
                context.addStep(new OperationStepHandler(){
                    @Override
                    public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
                        context.removeService(HttpManagementService.SERVICE_NAME);
                        final ServiceVerificationHandler handler = new ServiceVerificationHandler();
                        addService(context.getServiceTarget(), subModel, handler);
                        context.addStep(handler, OperationContext.Stage.VERIFY);
                        context.completeStep();
                    }
                }, OperationContext.Stage.RUNTIME);
View Full Code Here

        @Override
        public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
            final List<ServiceController<?>> newControllers = new ArrayList<ServiceController<?>>();
            final String realmName = ManagementUtil.getSecurityRealmName(operation);
            final ModelNode model = Resource.Tools.readModel(context.readResource(PathAddress.EMPTY_ADDRESS));
            SecurityRealmAddHandler.INSTANCE.installServices(context, realmName, model, new ServiceVerificationHandler(), newControllers);
            context.completeStep(new OperationContext.RollbackHandler() {
                @Override
                public void handleRollback(OperationContext context, ModelNode operation) {
                    for (ServiceController<?> sc : newControllers) {
                        context.removeService(sc);
View Full Code Here

        if (context.getType() == OperationContext.Type.SERVER) {

            context.addStep(new OperationStepHandler() {
                public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
                    ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
                    addServices(context, operation, verificationHandler, model, isXa());
                    context.addStep(verificationHandler, Stage.VERIFY);
                    context.completeStep();
                }
            }, OperationContext.Stage.RUNTIME);
View Full Code Here

            if (dataSources.getDrivers() != null && dataSources.getDrivers().size() > 0) {
                ConnectorLogger.DS_DEPLOYER_LOGGER.driversElementNotSupported(deploymentUnit.getName());
            }

            ServiceTarget serviceTarget = phaseContext.getServiceTarget();
            ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();

            if (dataSources.getDataSource() != null && dataSources.getDataSource().size() > 0) {
                for (DataSource ds : dataSources.getDataSource()) {
                    if (ds.isEnabled() && ds.getDriver() != null) {
                        try {
View Full Code Here

        if (context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
                    final ServiceTarget serviceTarget = context.getServiceTarget();
                    final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();

                    ModifiableResourceAdapter resourceAdapter = RaOperationUtil.buildResourceAdaptersObject(context, operation);

                    final ServiceController<?> resourceAdaptersService = context.getServiceRegistry(false).getService(
                            ConnectorServices.RESOURCEADAPTERS_SERVICE);
View Full Code Here

                        for (RegisteredProcessor processor : processorSet) {
                            processorList.add(processor.getProcessor());
                        }
                        finalDeployers.put(phase, Arrays.asList(processorList.toArray(new DeploymentUnitProcessor[processorList.size()])));
                    }
                    final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler();
                    DeployerChainsService.addService(context.getServiceTarget(), finalDeployers, verificationHandler);

                    context.addStep(verificationHandler, OperationContext.Stage.VERIFY);

                    if(context.completeStep() == OperationContext.ResultAction.ROLLBACK) {
View Full Code Here

TOP

Related Classes of org.jboss.as.controller.ServiceVerificationHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.