Examples of KernelServicesBuilder


Examples of org.jboss.as.subsystem.test.KernelServicesBuilder


    private void testTransformers_1_0_0(ModelTestControllerVersion controllerVersion) throws Exception {
        ModelVersion modelVersion = ModelVersion.create(1, 0, 0);
        //Use the non-runtime version of the extension which will happen on the HC
        KernelServicesBuilder builder = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT)
                .setSubsystemXml(getSubsystemXml());

        // Add legacy subsystems
        builder.createLegacyKernelServicesBuilder(null, controllerVersion, modelVersion)
                .addMavenResourceURL("org.jboss.as:jboss-as-jsr77:" + controllerVersion.getMavenGavVersion());

        KernelServices mainServices = builder.build();
        KernelServices legacyServices = mainServices.getLegacyServices(modelVersion);
        Assert.assertNotNull(mainServices);
        Assert.assertNotNull(legacyServices);
        checkSubsystemModelTransformation(mainServices, modelVersion);
    }
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServicesBuilder

        testTransformers_1_0_0(ModelTestControllerVersion.V7_1_3_FINAL);
    }

    private void testTransformers_1_0_0(ModelTestControllerVersion controllerVersion) throws Exception {
        ModelVersion modelVersion = ModelVersion.create(1, 0, 0);
        KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization());

        builder.createLegacyKernelServicesBuilder(null, controllerVersion, modelVersion)
                .addMavenResourceURL("org.jboss.as:jboss-as-cmp:" + controllerVersion.getMavenGavVersion())
                .configureReverseControllerCheck(createAdditionalInitialization(), null);

        KernelServices mainServices = builder.build();
        Assert.assertTrue(mainServices.isSuccessfulBoot());
        Assert.assertTrue(mainServices.getLegacyServices(modelVersion).isSuccessfulBoot());

        ModelTestUtils.checkFailedTransformedBootOperations(mainServices, modelVersion, parse(getSubsystemXml()),
                new FailedOperationTransformationConfig()
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServicesBuilder

    private void testTransformers1_1_0(ModelTestControllerVersion controllerVersion) throws Exception {
        String subsystemXml = "xsd1_1full.xml";   //This has no expressions not understood by 1.1.0
        ModelVersion modelVersion = ModelVersion.create(1, 1, 0); //The old model version
        //Use the non-runtime version of the extension which will happen on the HC
        KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization())
                .setSubsystemXmlResource(subsystemXml);

        // Add legacy subsystems
        builder.createLegacyKernelServicesBuilder(null, controllerVersion, modelVersion)
                .addMavenResourceURL("org.jboss.as:jboss-as-jaxr:" + controllerVersion.getMavenGavVersion())
                .setExtensionClassName("org.jboss.as.jaxr.extension.JAXRSubsystemExtension")
                .configureReverseControllerCheck(createAdditionalInitialization(), null);

        KernelServices mainServices = builder.build();
        KernelServices legacyServices = mainServices.getLegacyServices(modelVersion);
        Assert.assertNotNull(legacyServices);
        checkSubsystemModelTransformation(mainServices, modelVersion);
    }
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServicesBuilder

        testRejectExpressions1_1_0(ModelTestControllerVersion.V7_1_3_FINAL);
    }

    private void testRejectExpressions1_1_0(ModelTestControllerVersion controllerVersion) throws Exception {
        // create builder for current subsystem version
        KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization());

        // create builder for legacy subsystem version
        ModelVersion version_1_1_0 = ModelVersion.create(1, 1, 0);
        builder.createLegacyKernelServicesBuilder(null, controllerVersion, version_1_1_0)
                .addMavenResourceURL("org.jboss.as:jboss-as-jaxr:" + controllerVersion.getMavenGavVersion())
                .setExtensionClassName("org.jboss.as.jaxr.extension.JAXRSubsystemExtension")
                .configureReverseControllerCheck(createAdditionalInitialization(), null);

        KernelServices mainServices = builder.build();
        KernelServices legacyServices = mainServices.getLegacyServices(version_1_1_0);

        Assert.assertNotNull(legacyServices);
        Assert.assertTrue("main services did not boot", mainServices.isSuccessfulBoot());
        Assert.assertTrue(legacyServices.isSuccessfulBoot());

        List<ModelNode> xmlOps = builder.parseXmlResource("xsd1_1expressions.xml");

        ModelTestUtils.checkFailedTransformedBootOperations(mainServices, version_1_1_0, xmlOps,
                new FailedOperationTransformationConfig()
                .addFailedAttribute(PathAddress.pathAddress(JAXRExtension.SUBSYSTEM_PATH),
                        new FailedOperationTransformationConfig.RejectExpressionsConfig(JAXRSubsystemRootResource.CONNECTION_FACTORY_ATTRIBUTE))
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServicesBuilder

        return AdditionalInitialization.MANAGEMENT;
    }

    @Test
    public void testOperationCompatibility() throws Exception {
        KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization())
                .setSubsystemXmlResource("subsystem_with_expressions_compatible_1.1.0.xml");

        builder.createLegacyKernelServicesBuilder(createAdditionalInitialization(), ModelTestControllerVersion.V7_1_2_FINAL, VERSION_1_1_0)
                .addMavenResourceURL("org.jboss.as:jboss-as-naming:7.1.2.Final");

        KernelServices mainServices712 = builder.build();
        KernelServices legacyServices712 = mainServices712.getLegacyServices(VERSION_1_1_0);
        assertNotNull(legacyServices712);

        builder = createKernelServicesBuilder(createAdditionalInitialization())
                .setSubsystemXmlResource("subsystem_with_expressions_compatible_1.1.0.xml");

        builder.createLegacyKernelServicesBuilder(null, ModelTestControllerVersion.V7_1_3_FINAL, VERSION_1_1_0)
                .addMavenResourceURL("org.jboss.as:jboss-as-naming:7.1.3.Final");

        KernelServices mainServices713 = builder.build();
        KernelServices legacyServices713 = mainServices713.getLegacyServices(VERSION_1_1_0);
        assertNotNull(legacyServices713);
    }
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServicesBuilder

    public void testTransformers_EAP601() throws Exception {
        testTransformers_1_1_0(ModelTestControllerVersion.EAP_6_0_1);
    }

    private void testTransformers_1_1_0(ModelTestControllerVersion version) throws Exception {
        KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization())
                .setSubsystemXmlResource("subsystem_with_expressions_compatible_1.1.0.xml");

        builder.createLegacyKernelServicesBuilder(null, version, VERSION_1_1_0)
                .addMavenResourceURL("org.jboss.as:jboss-as-naming:" + version.getMavenGavVersion())
                .skipReverseControllerCheck();

        KernelServices mainServices = builder.build();
        KernelServices legacyServices = mainServices.getLegacyServices(VERSION_1_1_0);
        assertNotNull(legacyServices);

        checkSubsystemModelTransformation(mainServices, VERSION_1_1_0, MODEL_FIXER_1_1_0);
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServicesBuilder

     * Tests rejection of expressions in 1.1.0 model.
     *
     * @throws Exception
     */
    private void doTestRejectExpressions_1_1_0(ModelTestControllerVersion controllerVersion) throws Exception {
        KernelServicesBuilder builder = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT);

        // create builder for legacy subsystem version
        builder.createLegacyKernelServicesBuilder(null, controllerVersion, VERSION_1_1_0)
                .addMavenResourceURL("org.jboss.as:jboss-as-naming:" + controllerVersion.getMavenGavVersion());


        KernelServices mainServices = builder.build();
        assertTrue(mainServices.isSuccessfulBoot());
        KernelServices legacyServices = mainServices.getLegacyServices(VERSION_1_1_0);
        Assert.assertNotNull(legacyServices);
        assertTrue(legacyServices.isSuccessfulBoot());

View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServicesBuilder

    public void testTransformers_EAP611() throws Exception {
        testTransformers_1_2_0(ModelTestControllerVersion.EAP_6_1_1);
    }

    private void testTransformers_1_2_0(ModelTestControllerVersion version) throws Exception {
        KernelServicesBuilder builder = createKernelServicesBuilder(createAdditionalInitialization())
                .setSubsystemXmlResource("subsystem_with_expressions_compatible_1.2.0.xml");

        builder.createLegacyKernelServicesBuilder(null, version, VERSION_1_2_0)
                .addMavenResourceURL("org.jboss.as:jboss-as-naming:" + version.getMavenGavVersion())
                .skipReverseControllerCheck();

        KernelServices mainServices = builder.build();
        KernelServices legacyServices = mainServices.getLegacyServices(VERSION_1_2_0);
        assertNotNull(legacyServices);

        checkSubsystemModelTransformation(mainServices, VERSION_1_2_0);
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServicesBuilder

    public void testTransformers713() throws Exception {
        testTransformers(ModelTestControllerVersion.V7_1_3_FINAL);
    }

    private void testTransformers(ModelTestControllerVersion controllerVersion) throws Exception {
        KernelServicesBuilder builder = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT)
                .setSubsystemXml(readResource("subsystem-1.2.xml"));

        // Add legacy subsystems
        ModelVersion version_1_1_0 = ModelVersion.create(1, 1, 0);
        builder.createLegacyKernelServicesBuilder(null, controllerVersion, version_1_1_0)
                .addMavenResourceURL("org.jboss.as:jboss-as-jacorb:" + controllerVersion.getMavenGavVersion());

        KernelServices mainServices = builder.build();
        assertTrue(mainServices.isSuccessfulBoot());
        KernelServices legacyServices = mainServices.getLegacyServices(version_1_1_0);
        assertNotNull(legacyServices);
        assertTrue(legacyServices.isSuccessfulBoot());
View Full Code Here

Examples of org.jboss.as.subsystem.test.KernelServicesBuilder

    public void testTransformersSecurityIdentity713() throws Exception {
        testTransformersSecurityIdentity_1_1_0(ModelTestControllerVersion.V7_1_3_FINAL);
    }

    private void testTransformersSecurityIdentity_1_1_0(ModelTestControllerVersion controllerVersion) throws Exception {
        KernelServicesBuilder builder = createKernelServicesBuilder(AdditionalInitialization.MANAGEMENT)
                .setSubsystemXml(readResource("subsystem-1.2-security-identity.xml"));

        // Add legacy subsystems
        ModelVersion version_1_1_0 = ModelVersion.create(1, 1, 0);
        builder.createLegacyKernelServicesBuilder(AdditionalInitialization.MANAGEMENT, controllerVersion, version_1_1_0)
                .addMavenResourceURL("org.jboss.as:jboss-as-jacorb:" + controllerVersion.getMavenGavVersion());

        KernelServices mainServices = builder.build();
        assertTrue(mainServices.isSuccessfulBoot());
        KernelServices legacyServices = mainServices.getLegacyServices(version_1_1_0);
        assertNotNull(legacyServices);
        assertTrue(legacyServices.isSuccessfulBoot());
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.