Examples of readWholeModel()


Examples of org.jboss.as.subsystem.test.KernelServices.readWholeModel()

    public void testInstallIntoController() throws Exception {
       // Parse the subsystem xml and install into the controller
       KernelServices services = super.installInController(getSubsystemXml());

       // Read the whole model and make sure it looks as expected
       ModelNode model = services.readWholeModel();

       // System.out.println("model = " + model.asString());

       Assert.assertTrue(model.get(SUBSYSTEM).hasDefined(getMainSubsystemName()));
    }
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServices.readWholeModel()

       // Parse the subsystem xml and install into the first controller

       KernelServices servicesA = super.installInController(getSubsystemXml());

       // Get the model and the persisted xml from the first controller
       ModelNode modelA = servicesA.readWholeModel();
       String marshalled = servicesA.getPersistedSubsystemXml();

       // Install the persisted xml from the first controller into a second controller
       KernelServices servicesB = super.installInController(marshalled);
       ModelNode modelB = servicesB.readWholeModel();
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServices.readWholeModel()

       ModelNode modelA = servicesA.readWholeModel();
       String marshalled = servicesA.getPersistedSubsystemXml();

       // Install the persisted xml from the first controller into a second controller
       KernelServices servicesB = super.installInController(marshalled);
       ModelNode modelB = servicesB.readWholeModel();

       // Make sure the models from the two controllers are identical
       super.compare(modelA, modelB);
    }
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServices.readWholeModel()

    @Test
    public void testDescribeHandler() throws Exception {
       // Parse the subsystem xml and install into the first controller
       KernelServices servicesA = super.installInController(getSubsystemXml());
       // Get the model and the describe operations from the first controller
       ModelNode modelA = servicesA.readWholeModel();
       ModelNode describeOp = new ModelNode();
       describeOp.get(OP).set(DESCRIBE);
       describeOp.get(OP_ADDR).set(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, getMainSubsystemName())).toModelNode());
       List<ModelNode> operations = super.checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList();
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServices.readWholeModel()

       describeOp.get(OP_ADDR).set(PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, getMainSubsystemName())).toModelNode());
       List<ModelNode> operations = super.checkResultAndGetContents(servicesA.executeOperation(describeOp)).asList();

       // Install the describe options from the first controller into a second controller
       KernelServices servicesB = super.installInController(operations);
       ModelNode modelB = servicesB.readWholeModel();

       // Make sure the models from the two controllers are identical
       super.compare(modelA, modelB);

    }
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServices.readWholeModel()

        AdditionalInitialization additionalInit = AdditionalInitialization.MANAGEMENT;

        KernelServices servicesA = super.installInController(additionalInit, subsystemXml);
        //Get the model and the persisted xml from the first controller
        ModelNode modelA = servicesA.readWholeModel();
        String marshalled = servicesA.getPersistedSubsystemXml();
        servicesA.shutdown();

        System.out.println(marshalled);
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServices.readWholeModel()

        System.out.println(marshalled);

        //Install the persisted xml from the first controller into a second controller
        KernelServices servicesB = super.installInController(additionalInit, marshalled);
        ModelNode modelB = servicesB.readWholeModel();

        //Make sure the models from the two controllers are identical
        super.compare(modelA, modelB);

        assertRemoveSubsystemResources(servicesA);
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServices.readWholeModel()

        ServiceName connectorServiceName = RemotingServices.serverServiceName("test-connector");
        ServiceController<?> connectorService = services.getContainer().getRequiredService(connectorServiceName);
        assertNotNull(connectorService);

        ModelNode model = services.readWholeModel();
        ModelNode subsystem = model.require(SUBSYSTEM).require(RemotingExtension.SUBSYSTEM_NAME);
        assertEquals(5, subsystem.require(CommonAttributes.WORKER_READ_THREADS).asInt());
        assertEquals(6, subsystem.require(CommonAttributes.WORKER_TASK_CORE_THREADS).asInt());
        assertEquals(7, subsystem.require(CommonAttributes.WORKER_TASK_KEEPALIVE).asInt());
        assertEquals(8, subsystem.require(CommonAttributes.WORKER_TASK_LIMIT).asInt());
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServices.readWholeModel()

        write.get(OP_ADDR).add(SUBSYSTEM, RemotingExtension.SUBSYSTEM_NAME).add(CommonAttributes.CONNECTOR, "test-connector").add(CommonAttributes.PROPERTY, "org.xnio.Options.WORKER_ACCEPT_THREADS");
        write.get(NAME).set(VALUE);
        write.get(VALUE).set(2);
        ModelNode result = services.executeOperation(write);
        assertFalse(result.get(FAILURE_DESCRIPTION).toString(), result.hasDefined(FAILURE_DESCRIPTION));
        assertEquals(2, services.readWholeModel().get(SUBSYSTEM, RemotingExtension.SUBSYSTEM_NAME, CommonAttributes.CONNECTOR, "test-connector", CommonAttributes.PROPERTY, "org.xnio.Options.WORKER_ACCEPT_THREADS").require(VALUE).asInt());
        current.updateCurrentEndpoint(true);
        current.updateCurrentConnector(false);

        //remove property
        ModelNode remove = write.clone();
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServices.readWholeModel()

        remove.get(OP).set(REMOVE);
        remove.remove(NAME);
        remove.remove(VALUE);
        result = services.executeOperation(remove);
        assertFalse(result.get(FAILURE_DESCRIPTION).toString(), result.hasDefined(FAILURE_DESCRIPTION));
        assertFalse(services.readWholeModel().get(SUBSYSTEM, RemotingExtension.SUBSYSTEM_NAME, CommonAttributes.CONNECTOR, "test-connector", CommonAttributes.PROPERTY, "org.xnio.Options.WORKER_ACCEPT_THREADS").isDefined());
        current.updateCurrentEndpoint(true);
        current.updateCurrentConnector(false);

        //TODO property
        ModelNode add = remove.clone();
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.