Package org.jboss.as.controller

Examples of org.jboss.as.controller.ModelController.execute()


        ServiceBuilder<ModelController> builder = target.addService(ServiceName.of("ModelController"), svc);
        builder.install();
        svc.latch.await();
        ModelController controller = svc.getValue();
        ModelNode setup = Util.getEmptyOperation("setup", new ModelNode());
        controller.execute(setup, null, null, null);
        processState.setRunning();
        return controller;
    }

    private void executeOperations(ModelController controller, List<ModelNode> ops) {
View Full Code Here


        //sharedState = svc.state;
        svc.latch.await();
        ModelController controller = svc.getValue();
        ModelNode setup = Util.getEmptyOperation("setup", new ModelNode());
        controller.execute(setup, null, null, null);
        processState.setRunning();

        KernelServices kernelServices = new KernelServices(container, controller, persister, new OperationValidator(svc.rootRegistration));
        this.kernelServices.add(kernelServices);
        if (svc.error != null) {
View Full Code Here

        final ModelNode read = new ModelNode();
        read.get(OP).set("read-resource");
        read.get(OP_ADDR).set(address);

        ModelNode result = controller.execute(read, null, null, null);
        System.out.println(result);
        result = result.get("result");

        Assert.assertEquals(4, result.asInt()); // A,B one,two
View Full Code Here

        final ModelNode describe = new ModelNode();
        describe.get(OP).set("describe");
        describe.get(OP_ADDR).set(address);

        result = controller.execute(describe, null, null, null).get("result");

    }

    @Override
    DescriptionProvider getRootDescriptionProvider() {
View Full Code Here

        ServiceBuilder<ModelController> builder = target.addService(ServiceName.of("ModelController"), svc);
        builder.install();
        svc.latch.await();
        ModelController controller = svc.getValue();
        ModelNode setup = Util.getEmptyOperation("setup", new ModelNode());
        controller.execute(setup, null, null, null);
        processState.setRunning();
        return controller;
    }

    private void executeOperations(ModelController controller, List<ModelNode> ops) {
View Full Code Here

        }
        ModelController controller = (ModelController)serviceContainer.getRequiredService(Services.JBOSS_SERVER_CONTROLLER).getValue();

        System.out.println("toggle " + enable + ":" + op);

        ModelNode result = controller.execute(op, OperationMessageHandler.logging, OperationTransactionControl.COMMIT, null);
        if (expectFailure) {
            System.out.println("Expected failure " + result.get(FAILURE_DESCRIPTION).asString());
            Assert.assertEquals(FAILED, result.get(OUTCOME).asString());
        } else {
            Assert.assertEquals(result.get(FAILURE_DESCRIPTION).asString(), SUCCESS, result.get(OUTCOME).asString());
View Full Code Here

        //sharedState = svc.state;
        svc.latch.await();
        ModelController controller = svc.getValue();
        ModelNode setup = Util.getEmptyOperation("setup", new ModelNode());
        controller.execute(setup, null, null, null);
        processState.setRunning();

        KernelServices kernelServices = new KernelServices(container, controller, persister, new OperationValidator(svc.rootRegistration));
        this.kernelServices.add(kernelServices);
        if (svc.error != null) {
View Full Code Here

        //sharedState = svc.state;
        svc.latch.await();
        ModelController controller = svc.getValue();
        ModelNode setup = Util.getEmptyOperation("setup", new ModelNode());
        controller.execute(setup, null, null, null);
        processState.setRunning();

        KernelServices kernelServices = new KernelServices(container, controller, persister, new OperationValidator(svc.rootRegistration));
        this.kernelServices.add(kernelServices);
        if (svc.error != null) {
View Full Code Here

        }
        ModelController controller = (ModelController)serviceContainer.getRequiredService(Services.JBOSS_SERVER_CONTROLLER).getValue();

        System.out.println("toggle " + enable + ":" + op);

        ModelNode result = controller.execute(op, OperationMessageHandler.logging, OperationTransactionControl.COMMIT, null);
        if (expectFailure) {
            System.out.println("Expected failure " + result.get(FAILURE_DESCRIPTION).asString());
            Assert.assertEquals(FAILED, result.get(OUTCOME).asString());
        } else {
            Assert.assertEquals(result.get(FAILURE_DESCRIPTION).asString(), SUCCESS, result.get(OUTCOME).asString());
View Full Code Here

        //sharedState = svc.state;
        svc.latch.await();
        ModelController controller = svc.getValue();
        ModelNode setup = Util.getEmptyOperation("setup", new ModelNode());
        controller.execute(setup, null, null, null);
        processState.setRunning();

        KernelServices kernelServices = new KernelServices(container, controller, persister);
        this.kernelServices.add(kernelServices);
        return kernelServices;
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.