Package org.jboss.as.controller

Examples of org.jboss.as.controller.RuntimeTask


        populate(operation, context.getSubModel());

        RuntimeOperationContext runtime = context.getRuntimeContext();
        if (runtime != null) {
            RuntimeTask task = new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    ModelNode transport = operation.get(ModelKeys.TRANSPORT);
                    String type = transport.require(ModelKeys.TYPE).asString();
                    TransportConfigurationImpl transportConfig = new TransportConfigurationImpl(type, ProtocolStackAdd.this.defaults.get(type));
View Full Code Here


        populate(operation, context.getSubModel());

        RuntimeOperationContext runtime = context.getRuntimeContext();
        if (runtime != null) {
            RuntimeTask task = new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    String stack = operation.require(ModelKeys.DEFAULT_STACK).asString();
                    InjectedValue<ChannelFactory> factory = new InjectedValue<ChannelFactory>();
                    ValueService<ChannelFactory> service = new ValueService<ChannelFactory>(factory);
View Full Code Here

        populate(operation, context.getSubModel());

        RuntimeOperationContext runtime = context.getRuntimeContext();
        if (runtime != null) {
            RuntimeTask task = new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    String defaultCache = operation.require(ModelKeys.DEFAULT_CACHE).asString();
                    ServiceName[] aliases = null;
                    if (operation.hasDefined(ModelKeys.ALIAS)) {
View Full Code Here

        populate(operation, context.getSubModel());

        RuntimeOperationContext runtime = context.getRuntimeContext();
        if (runtime != null) {
            RuntimeTask task = new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    String defaultContainer = operation.require(ModelKeys.DEFAULT_CACHE_CONTAINER).asString();
                    InjectedValue<EmbeddedCacheManager> container = new InjectedValue<EmbeddedCacheManager>();
                    ValueService<EmbeddedCacheManager> service = new ValueService<EmbeddedCacheManager>(container);
View Full Code Here

        ModelNode restoreOperation = CacheContainerAdd.createOperation(opAddr, context.getSubModel());

        RuntimeOperationContext runtime = context.getRuntimeContext();
        if (runtime != null) {
            RuntimeTask task = new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    ServiceController<?> service = context.getServiceRegistry().getService(EmbeddedCacheManagerService.getServiceName(name));
                    if (service != null) {
                        service.setMode(ServiceController.Mode.REMOVE);
View Full Code Here

    public OperationResult execute(final OperationContext context, final ModelNode operation, final ResultHandler resultHandler) {
        populateSubModel(context.getSubModel(), operation);

        if (context instanceof BootOperationContext) {
            final BootOperationContext updateContext = (BootOperationContext) context;
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    log.infof("Activating OSGi Subsystem");
                    long begin = System.currentTimeMillis();
                    SubsystemState subsystemState = createSubsystemState(operation);
View Full Code Here

        final ModelNode subModel = context.getSubModel();
        subModel.get(CONFIGURATION).set(config);

        if (context instanceof BootOperationContext) {
            final BootOperationContext updateContext = (BootOperationContext) context;
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    log.info("Activating WebServices Extension");
                    WSServices.saveContainerRegistry(context.getServiceRegistry());
View Full Code Here

        // update the model
        context.getSubModel().get(CommonAttributes.SCAN_ENABLED).set(false);

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceController<?> controller = context.getServiceRegistry()
                            .getService(DeploymentScannerService.getServiceName(name));
                    if (controller == null) {
                        throw new OperationFailedException(new ModelNode().set("scanner not configured"));
View Full Code Here

        compensatingOperation.get(OP_ADDR).set(operation.require(OP_ADDR));
        // update the model
        context.getSubModel().get(CommonAttributes.SCAN_ENABLED).set(true);

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceController<?> controller = context.getServiceRegistry().getService(DeploymentScannerService.getServiceName(name));
                    if (controller == null) {
                        throw new OperationFailedException(new ModelNode().set("scanner not configured"));
                    } else {
View Full Code Here

        subModel.get(CommonAttributes.SERVER_BINDING).clear();
        subModel.get(CommonAttributes.REGISTRY_BINDING).clear();

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceController<?> service = context.getServiceRegistry().getService(JMXConnectorService.SERVICE_NAME);
                    if (service != null) {
                        service.setMode(ServiceController.Mode.REMOVE);
                    }
View Full Code Here

TOP

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

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.