Package org.jboss.as.controller

Examples of org.jboss.as.controller.RuntimeTask


        subModel.get(RECOVERY_ENVIRONMENT, STATUS_BINDING).set(operation.get(RECOVERY_ENVIRONMENT, STATUS_BINDING));
        subModel.get(COORDINATOR_ENVIRONMENT, ENABLE_STATISTICS).set(operation.get(COORDINATOR_ENVIRONMENT, ENABLE_STATISTICS));


        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget target = context.getServiceTarget();

                    // XATerminator has no deps, so just add it in there
                    final XATerminatorService xaTerminatorService = new XATerminatorService();
View Full Code Here


        ModelNode opAddr = operation.require(OP_ADDR);
        ModelNode compensatingOp = QueueAdd.getOperation(opAddr, context.getSubModel());
        PathAddress address = PathAddress.pathAddress(opAddr);
        final String name = address.getLastElement().getValue();
        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceController<?> service = context.getServiceRegistry().getService(MessagingServices.CORE_QUEUE_BASE.append(name));
                    if (service != null) {
                        service.setMode(ServiceController.Mode.REMOVE);
                    }
View Full Code Here

        if(operation.hasDefined(ENTRIES)) {
            context.getSubModel().get(ENTRIES).set(operation.get(ENTRIES));
        }

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final JMSTopicService service = new JMSTopicService(name, jndiBindings(operation));
                    final ServiceName serviceName = JMSServices.JMS_TOPIC_BASE.append(name);
                    context.getServiceTarget().addService(serviceName, service)
                            .addDependency(JMSServices.JMS_MANAGER, JMSServerManager.class, service.getJmsServer())
View Full Code Here

            }
        }
        subModel.get(QUEUE);

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget serviceTarget = context.getServiceTarget();
                    // Create the HornetQ Service
                    final HornetQService hqService = new HornetQService();
View Full Code Here

        final ModelNode subModel = context.getSubModel();
        final ModelNode compensatingOperation = JMSQueueAdd.getOperation(opAddr, subModel);

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

                subModel.get(attribute).set(operation.get(attribute));
            }
        }

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ConnectionFactoryConfiguration configuration = createConfiguration(name, operation);
                    final ConnectionFactoryService service = new ConnectionFactoryService(configuration);
                    final ServiceName serviceName = JMSServices.JMS_CF_BASE.append(name);
                    context.getServiceTarget().addService(serviceName, service)
View Full Code Here

        final ModelNode subModel = context.getSubModel();
        final ModelNode compensatingOperation = ConnectionFactoryAdd.getAddOperation(operationAddress, subModel);

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

        }
        if (durable != null) {
            model.get(DURABLE).set(durable);
        }
        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final QueueService service = new QueueService(queueAddress, name, filter, durable != null ? durable : true, false);
                    context.getServiceTarget().addService(MessagingServices.CORE_QUEUE_BASE.append(name), service)
                            .addDependency(MessagingServices.JBOSS_MESSAGING, HornetQServer.class, service.getHornetQService())
View Full Code Here

    public OperationResult execute(final OperationContext context, final ModelNode operation, final ResultHandler resultHandler) {

        final ModelNode compensatingOperation = Util.getResourceRemoveOperation(operation.require(OP_ADDR));

        if(context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {

                }
            });
            // FIXME the JMSServer is started as part of the messaging subsystem for now
View Full Code Here

        final ModelNode subModel = context.getSubModel();
        final ModelNode compensatingOperation = JMSTopicAdd.getOperation(opAddr, subModel);

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceController<?> service = context.getServiceRegistry().getService(JMSServices.JMS_TOPIC_BASE.append(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.