Package org.jboss.as.osgi.parser.SubsystemState

Examples of org.jboss.as.osgi.parser.SubsystemState.Activation


            builder.addProvidedService(Services.FRAMEWORK_MODULE_PROVIDER);
            builder.addProvidedService(Services.MODULE_LOADER_PROVIDER);
            builder.addProvidedService(Services.SYSTEM_SERVICES_PROVIDER);

            // Create the {@link Framework} services
            Activation activation = injectedSubsystemState.getValue().getActivationPolicy();
            Mode initialMode = (activation == Activation.EAGER ? Mode.ACTIVE : Mode.ON_DEMAND);
            builder.createFrameworkServices(initialMode, true);
        } catch (Throwable t) {
            throw new StartException("Failed to create Framework services", t);
        }
View Full Code Here


    private ActivationAttributeHandler() {
    }

    @Override
    public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        Activation val = Activation.valueOf(operation.require(ModelDescriptionConstants.VALUE).asString().toUpperCase(Locale.ENGLISH));
        ModelNode node = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel();
        node.get(ModelConstants.ACTIVATION).set(val.toString().toLowerCase(Locale.ENGLISH));
        context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER);
    }
View Full Code Here

            RepositoryProvider.addService(serviceTarget);
            ResolverService.addService(serviceTarget);
            SystemServicesIntegration.addService(serviceTarget, resource);

            // Configure the {@link Framework} builder
            Activation activation = subsystemState.getActivationPolicy();
            Mode initialMode = (activation == Activation.EAGER ? Mode.ACTIVE : Mode.ON_DEMAND);
            FrameworkBuilder builder = new FrameworkBuilder(props, initialMode);
            builder.setServiceContainer(serviceContainer);
            builder.setServiceTarget(serviceTarget);
View Full Code Here

            final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) {

        LOGGER.infoActivatingSubsystem();

        final ServiceTarget serviceTarget = context.getServiceTarget();
        final Activation activationMode = getActivationMode(operation);
        final InitialDeploymentTracker deploymentTracker = new InitialDeploymentTracker(context, activationMode);

        context.addStep(new OperationStepHandler() {
            public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
                newControllers.add(PersistentBundlesIntegration.addService(serviceTarget, deploymentTracker));
View Full Code Here

        // Add the subsystem state as a service
        newControllers.add(SubsystemState.addService(serviceTarget, activationMode));
    }

    private Activation getActivationMode(ModelNode operation) {
        Activation activation = SubsystemState.DEFAULT_ACTIVATION;
        if (operation.has(ModelConstants.ACTIVATION)) {
            activation = Activation.valueOf(operation.get(ModelConstants.ACTIVATION).asString().toUpperCase(Locale.ENGLISH));
        }
        return activation;
    }
View Full Code Here

                    String value = SecurityActions.getSystemProperty("jboss.protocol.handler.modules", "org.jboss.osgi.framework");
                    if (!value.equals("org.jboss.osgi.framework"))
                        value = value + "|org.jboss.osgi.framework";
                    SecurityActions.setSystemProperty("jboss.protocol.handler.modules", value);

                    Activation policy = subsystemState.getActivationPolicy();
                    BundleManagerService.addService(target, subsystemState);
                    FrameworkService.addService(target, subsystemState);
                    BundleContextService.addService(target, policy);
                    PackageAdminService.addService(target);
                    StartLevelService.addService(target);
View Full Code Here

    // the conversion to detyped so the services do not yet need the detyped
    // API to be introduced.
    private SubsystemState createSubsystemState(final ModelNode operation) {
        SubsystemState subsystemState = new SubsystemState();

        Activation activation = DEFAULT_ACTIVATION;
        if (operation.has(ACTIVATION)) {
            activation = Activation.valueOf(operation.get(ACTIVATION).asString().toUpperCase());
        }
        subsystemState.setActivation(activation);
View Full Code Here

    // the conversion to detyped so the services do not yet need the detyped
    // API to be introduced.
    private SubsystemState createSubsystemState(final ModelNode operation) {
        SubsystemState subsystemState = new SubsystemState();

        Activation activation = DEFAULT_ACTIVATION;
        if (operation.has(ACTIVATION)) {
            activation = Activation.valueOf(operation.get(ACTIVATION).asString().toUpperCase());
        }
        subsystemState.setActivation(activation);
View Full Code Here

            builder.addProvidedService(Services.FRAMEWORK_MODULE_PROVIDER);
            builder.addProvidedService(Services.MODULE_LOADER_PROVIDER);
            builder.addProvidedService(Services.SYSTEM_SERVICES_PROVIDER);

            // Create the {@link Framework} services
            Activation activation = subsystemState.getActivationPolicy();
            Mode initialMode = (activation == Activation.EAGER ? Mode.ACTIVE : Mode.ON_DEMAND);
            builder.createFrameworkServices(initialMode, true);
        } catch (Throwable t) {
            throw new StartException("Failed to create Framework services", t);
        }
View Full Code Here

    private ActivationAttributeHandler() {
    }

    @Override
    public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        Activation val = Activation.valueOf(operation.require(ModelDescriptionConstants.VALUE).asString().toUpperCase(Locale.ENGLISH));
        ModelNode node = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel();
        node.get(ModelConstants.ACTIVATION).set(val.toString().toLowerCase(Locale.ENGLISH));
        context.completeStep();
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.osgi.parser.SubsystemState.Activation

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.