Examples of RuntimeTask


Examples of org.jboss.as.controller.RuntimeTask

        }
        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

Examples of org.jboss.as.controller.RuntimeTask

    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

Examples of org.jboss.as.controller.RuntimeTask

        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

Examples of org.jboss.as.controller.RuntimeTask

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

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final JMSQueueService service = new JMSQueueService(name, selector,
                            operation.get(DURABLE).asBoolean(true), jndiBindings(operation));
                    final ServiceName serviceName = JMSServices.JMS_QUEUE_BASE.append(name);
                    context.getServiceTarget().addService(serviceName, service)
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

    @Override
    protected boolean applyUpdateToRuntime(final OperationContext context, final ModelNode operation, final ResultHandler resultHandler,
            final String attributeName, final ModelNode newValue, final ModelNode currentValue) throws OperationFailedException {

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

                    final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
                    final String name = address.getLastElement().getValue();
                    final ServiceController<?> controller = context.getServiceRegistry()
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        if (autoDeployExp != null) subModel.get(CommonAttributes.AUTO_DEPLOY_EXPLODED).set(autoDeployExp);
        if(relativeTo != null) subModel.get(CommonAttributes.RELATIVE_TO).set(relativeTo);
        if (deploymentTimeout != null) subModel.get(CommonAttributes.DEPLOYMENT_TIMEOUT).set(deploymentTimeout);

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    final ServiceTarget serviceTarget = context.getServiceTarget();
                    DeploymentScannerService.addService(serviceTarget, name, relativeTo, path, interval, TimeUnit.MILLISECONDS,
                                                        autoDeployZip, autoDeployExp, enabled, deploymentTimeout);
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        if (subModel.hasDefined(CommonAttributes.DEPLOYMENT_TIMEOUT))
            compensatingOperation.get(CommonAttributes.DEPLOYMENT_TIMEOUT).set(subModel.get(CommonAttributes.DEPLOYMENT_TIMEOUT));


        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) {
                        controller.setMode(ServiceController.Mode.REMOVE);
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

            resolvedSubjectFactoryClassName = subjectFactoryClassName;
        }

        if (context instanceof BootOperationContext) {
            final BootOperationContext updateContext = (BootOperationContext) context;
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    updateContext.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_MODULE,
                            new SecurityDependencyProcessor());

                    final ServiceTarget target = context.getServiceTarget();
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        Util.copyParamsToModel(operation, context.getSubModel());

        final ApplicationPolicy applicationPolicy = createApplicationPolicy(securityDomain, operation);

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                @Override
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    // add parsed security domain to the Configuration
                    final ApplicationPolicyRegistration loginConfig = getConfiguration(context.getServiceRegistry());
                    loginConfig.addApplicationPolicy(applicationPolicy.getName(), applicationPolicy);
View Full Code Here

Examples of org.jboss.as.controller.RuntimeTask

        // Create the compensating operation
        final ModelNode compensatingOperation = SecurityDomainAdd.getRecreateOperation(opAddr, context.getSubModel());

        if (context.getRuntimeContext() != null) {
            context.getRuntimeContext().setRuntimeTask(new RuntimeTask() {
                public void execute(RuntimeTaskContext context) throws OperationFailedException {
                    // remove security domain
                    final ServiceController<?> jaasConfigurationService = context.getServiceRegistry().getService(
                            JaasConfigurationService.SERVICE_NAME);
                    if (jaasConfigurationService != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.