Package org.jboss.as.controller.client

Examples of org.jboss.as.controller.client.ModelControllerClient.execute()


        smtpServerAddress.add("subsystem", "mail");
        smtpServerAddress.add("mail-session", SMTPMailServiceConstants.JNDI_BIND_NAME_MAIL_SESSION);
        smtpServerAddress.add("server", "smtp");
        steps.add(createSMTPServer);

        System.out.println("Configure mail service :" + client.execute(composite));

        /*
         * With the config all set and dependencies in place, now we can deploy
         */

 
View Full Code Here


        final ModelNode removeSocketBindingOperation = new ModelNode();
        removeSocketBindingOperation.get("operation").set("remove");
        final ModelNode socketBindingAddress = removeSocketBindingOperation.get("address");
        socketBindingAddress.add("socket-binding-group", "standard-sockets");
        socketBindingAddress.add("remote-destination-outbound-socket-binding", "mail-smtp-25000");
        System.out.println("REMOVE SOCKETS" + client.execute(removeSocketBindingOperation));

        final ModelNode removeMailServiceOperation = new ModelNode();
        removeMailServiceOperation.get("operation").set("remove");
        final ModelNode smtpAddress = removeMailServiceOperation.get("address");
        smtpAddress.add("subsystem", "mail");
View Full Code Here

        final ModelNode removeMailServiceOperation = new ModelNode();
        removeMailServiceOperation.get("operation").set("remove");
        final ModelNode smtpAddress = removeMailServiceOperation.get("address");
        smtpAddress.add("subsystem", "mail");
        smtpAddress.add("mail-session", SMTPMailServiceConstants.JNDI_BIND_NAME_MAIL_SESSION);
        System.out.println("REMOVE MAIL" + client.execute(removeMailServiceOperation));

        final ModelNode reloadOperation = new ModelNode();
        reloadOperation.get("operation").set("reload");
        System.out.println("Reload config:" + client.execute(reloadOperation));
        Thread.sleep(3000); // Because the operation returns but then server reload continues in the BG
View Full Code Here

        smtpAddress.add("mail-session", SMTPMailServiceConstants.JNDI_BIND_NAME_MAIL_SESSION);
        System.out.println("REMOVE MAIL" + client.execute(removeMailServiceOperation));

        final ModelNode reloadOperation = new ModelNode();
        reloadOperation.get("operation").set("reload");
        System.out.println("Reload config:" + client.execute(reloadOperation));
        Thread.sleep(3000); // Because the operation returns but then server reload continues in the BG
                    // Find from the WildFly team a better notification mechanism upon which to wait
                    // https://github.com/arquillian/continuous-enterprise-development/issues/66
        //no longer needed since WildFly 8 CR1
    }
View Full Code Here

            throw new IllegalStateException("Failed to build operation", e1);
        }

        List<String> result;
        try {
            ModelNode outcome = client.execute(request);
            if (!Util.isSuccess(outcome)) {
                // TODO logging... exception?
                result = Collections.emptyList();
            } else {
                result = Util.getList(outcome);
View Full Code Here

            throw new IllegalStateException("Failed to build operation", e1);
        }

        List<String> result;
        try {
            ModelNode outcome = client.execute(request);
            if (!Util.isSuccess(outcome)) {
                // TODO logging... exception?
                result = Collections.emptyList();
            } else {
                result = Util.getList(outcome);
View Full Code Here

            throw new IllegalStateException("Failed to build operation", e1);
        }

        List<CommandArgument> result;
        try {
            ModelNode outcome = client.execute(request);
            if (!Util.isSuccess(outcome)) {
                result = Collections.emptyList();
            } else {
                outcome.get(Util.REQUEST_PROPERTIES);
                final List<String> names = Util.getRequestPropertyNames(outcome);
View Full Code Here

        if (adminOnly != null) {
            operation.get(ModelDescriptionConstants.ADMIN_ONLY).set(adminOnly);
        }
        final ModelControllerClient client = ModelControllerClient.Factory.create(DomainTestSupport.masterAddress, HC_PORT, getCallbackHandler());
        try {
            Assert.assertEquals(SUCCESS, client.execute(operation).get(OUTCOME).asString());
        } catch (IOException canHappenWhenShuttingDownController) {
        }
    }

    private void shutdownHostController(boolean restart) throws Exception {
View Full Code Here

        operation.get(OP).set(READ_RESOURCE_OPERATION);
        operation.get(OP_ADDR).set(getHostControllerServerAddress(host, server));

        final ModelControllerClient client = ModelControllerClient.Factory.create(DomainTestSupport.masterAddress, HC_PORT, getCallbackHandler());
        try {
            final ModelNode result = client.execute(operation);
            if (result.get(OUTCOME).asString().equals(SUCCESS)){
                final ModelNode model = result.require(RESULT);
                if (model.hasDefined(NAME) && model.get(NAME).asString().equals(server)) {
                    return true;
                }
View Full Code Here

        } else {
            final ModelNode req = new ModelNode();
            req.get(Util.OPERATION).set(Util.READ_RESOURCE);
            req.get(Util.ADDRESS).setEmptyList();
            try {
                final ModelNode response = client.execute(req);
                if(Util.isSuccess(response)) {
                    if(response.hasDefined(Util.RESULT)) {
                        final ModelNode result = response.get(Util.RESULT);
                        byte flag = 0;
                        if(result.hasDefined("release-version")) {
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.