1 2 Previous Next 16 Replies Latest reply on Oct 29, 2010 9:10 AM by bosschaert Go to original post
      • 15. Re: Remote JMX connector for AS7
        thomas.diesler

        How do you test this? The ARQ JMX endpoint is only available when an ARQ test is running.

        Did the shared file approach not work?

        • 16. Re: Remote JMX connector for AS7
          bosschaert

          Thomas Diesler wrote:

           

          How do you test this? The ARQ JMX endpoint is only available when an ARQ test is running.

          I normally test this by setting breakpoints in the ARQ run. However you can test the same with a little dummy program that simply exposes the JMX server. It should be enough to test whether the connect() call succeeds or not.

          Note that I don't use 127.0.0.1 or localhost in my connection string as I noticed that even if I use these in my connection string the local host IP gets substituted at some point down the line when the client tries to connect to it.

           

          {code}public class TestServer

          {

             public static void main(String[] args) throws Exception

             {

                LocateRegistry.createRegistry(1190);

                MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();

                JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://192.168.153.134:1191/jndi/rmi://192.168.153.134:1190/arquillian-osgi-callback");

                JMXConnectorServer jmxServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbeanServer);

                jmxServer.start();

           

                for (;;)

                {

                   Thread.sleep(100000000);

                }

             }

          }{code}

           

          Thomas Diesler wrote:

           

          Did the shared file approach not work?

           

          A file based approach to replace the JMX calls might work, but it requires quite a bit of work since it is not known in advance with what parameters JMX API that is used once the connection is established is invoked. So we'd have to come up with some protocol there.

           

          I was hoping that the fact that the JMX client can't connect would be something small, in that case I should be able to reuse the existing stuff.

          1 2 Previous Next