Package org.jboss.as.arquillian.container

Examples of org.jboss.as.arquillian.container.ManagementClient


                final int port = Integer.parseInt(managementPort);
                modelControllerClient = ModelControllerClient.Factory.create(
                        address,
                        port,
                        getCallbackHandler());
                current = new ManagementClient(modelControllerClient, address, port);

            } catch (IOException e) {
                throw new RuntimeException(e);
            } catch (ClassNotFoundException e) {
                throw new RuntimeException(e);
View Full Code Here


    }

    @Test(expected = DeploymentException.class)
    public void disableLoggingDependencies() throws Exception {
        final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
        final ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
        Assert.assertTrue("Container is not started", managementClient.isServerInRunningState());

        try {
            // Test default behaviour
            deployer.deploy(DEPLOYMENT);
            deployer.undeploy(DEPLOYMENT);
View Full Code Here

    @Test
    @OperateOnDeployment(DEPLOYMENT)
    public void testHelloStringAfterReload() throws Exception {
        Assert.assertTrue(containerController.isStarted(DEFAULT_JBOSSAS));
        ManagementClient managementClient = new ManagementClient(TestSuiteEnvironment.getModelControllerClient(),
                TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
        QName serviceName = new QName("http://jbossws.org/basic", "POJOService");
        URL wsdlURL = new URL(managementClient.getWebUri().toURL(), '/' + DEPLOYMENT + "/POJOService?wsdl");
        checkWsdl(wsdlURL);
        Service service = Service.create(wsdlURL, serviceName);
        EndpointIface proxy = service.getPort(EndpointIface.class);
        Assert.assertEquals("Hello World!", proxy.helloString("World"));
        reloadServer(managementClient, 100000);
View Full Code Here

    public void startAndSetupContainer() throws Exception {

        LOGGER.info("*** starting server");
        containerController.start(CONTAINER);
        ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
        ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(),
                TestSuiteEnvironment.getServerPort(), "http-remoting");

        LOGGER.info("*** will configure server now");
        AbstractCertificateLoginModuleTestCase.HTTPSConnectorSetup.INSTANCE.setup(managementClient, CONTAINER);
        SecurityDomainsSetup.INSTANCE.setup(managementClient, CONTAINER);
View Full Code Here

    @InSequence(3)
    public void stopContainer() throws Exception {

        deployer.undeploy(APP_NAME);
        final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
        final ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(),
                TestSuiteEnvironment.getServerPort(), "http-remoting");

        LOGGER.info("*** reseting test configuration");
        AbstractCertificateLoginModuleTestCase.HTTPSConnectorSetup.INSTANCE.tearDown(managementClient, CONTAINER);
        SecurityDomainsSetup.INSTANCE.tearDown(managementClient, CONTAINER);
View Full Code Here

    }

    @Before
    public void prepareContainer() throws Exception {
        final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
        final ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
        try {
            // Start the container
            container.start(CONTAINER);

            // Get custom log files
View Full Code Here

    }

    @Test
    public void loggingPreferences(@ArquillianResource URL url) throws Exception {
        final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
        final ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
        Assert.assertTrue("Container is not started", managementClient.isServerInRunningState());

        try {
            // Per-deploy logging test
            Response response = getResponse(new URL(url, "logger?msg=" + URLEncoder.encode(DEPLOYMENT_LOG_MESSAGE, "utf-8")));
            Assert.assertTrue("Invalid response statusCode: " + response + " URL: " + url, response.statusCode == HttpServletResponse.SC_OK);
View Full Code Here

    public void startAndSetupContainer() throws Exception {

        LOGGER.info("*** starting server");
        containerController.start(CONTAINER);
        ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
        ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(),
                TestSuiteEnvironment.getServerPort(), "http-remoting");

        LOGGER.info("*** will configure server now");
        AbstractCertificateLoginModuleTestCase.HTTPSConnectorSetup.INSTANCE.setup(managementClient, CONTAINER);
        DataSourcesSetup.INSTANCE.setup(managementClient, CONTAINER);
View Full Code Here

    @InSequence(3)
    public void stopContainer() throws Exception {

        deployer.undeploy(APP_NAME);
        final ModelControllerClient client = TestSuiteEnvironment.getModelControllerClient();
        final ManagementClient managementClient = new ManagementClient(client, TestSuiteEnvironment.getServerAddress(),
                TestSuiteEnvironment.getServerPort(), "http-remoting");

        LOGGER.info("*** reseting test configuration");
        AbstractCertificateLoginModuleTestCase.HTTPSConnectorSetup.INSTANCE.tearDown(managementClient, CONTAINER);
        SecurityDomainsSetup.INSTANCE.tearDown(managementClient, CONTAINER);
View Full Code Here

    @Test
    @OperateOnDeployment(DEPLOYMENT)
    public void testWSDLHostChangeRequiresReloadAndDoesNotAffectRuntime() throws Exception {
        Assert.assertTrue(containerController.isStarted(DEFAULT_JBOSSAS));
        ManagementClient managementClient = new ManagementClient(TestSuiteEnvironment.getModelControllerClient(),
                TestSuiteEnvironment.getServerAddress(), TestSuiteEnvironment.getServerPort(), "http-remoting");
       
        ModelControllerClient client = managementClient.getControllerClient();
        String initialWsdlHost = null;
        try {
            initialWsdlHost = getWsdlHost(client);
           
            //change wsdl-host to "foo-host" and reload
            final String hostname = "foo-host";
          setWsdlHost(client, hostname);
          reloadServer(client, 100000);

            //change wsdl-host to "bar-host" and verify deployment still uses "foo-host"
          setWsdlHost(client, "bar-host");
          URL wsdlURL = new URL(managementClient.getWebUri().toURL(), '/' + DEPLOYMENT + "/POJOService?wsdl");
          checkWsdl(wsdlURL, hostname);
        } finally {
            try {
                if (initialWsdlHost != null) {
                    setWsdlHost(client, initialWsdlHost);
                }
            } finally {
                managementClient.close();
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.arquillian.container.ManagementClient

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.