0 Replies Latest reply on Nov 2, 2016 2:25 PM by alex lozano

    addServer by JMX

    alex lozano Newbie



      I'm trying to add a server through JMX by jboss.as:subsystem=undertow addServer method, but when you create it tells me that I reload the server. There is a way to do this without having to reload?

      I'm using JBoss EAP 7


      try {

                  System.out.println("Creating Server:");

                  ObjectName on = new ObjectName("jboss.as:subsystem=undertow");

                  platformMBeanServer = ManagementFactory.getPlatformMBeanServer();


                  Object[] params = new Object[3];

                  String nameServer =  "test_server";

                  params[0] = new String(nameServer);

                  params[1] = "default-host";

                  params[2] = "default";


                  String[] signature = new String[3];

                  signature[0] = String.class.getName();

                  signature[1] = CompositeData.class.getName();

                  signature[2] = Boolean.class.getName();


                  platformMBeanServer.invoke(on, "addServer", params, signature);


      } catch (Exception e) {