David Bosschaert [
http://community.jboss.org/people/bosschaert] created the discussion
"Re: Remote JMX connector for AS7"
To view the discussion, visit:
http://community.jboss.org/message/568974#568974
--------------------------------------------------------------
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.
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); } }}
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.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/568974#568974]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]