we have an EJB deployed as a part of a WAR file Wildfly 8.2.0.
The WAR file contains jboss-deployment-structure.xml importing the dependency to org.jboss.remoting-jmx module.
When trying to connect to a JMX endpoint using http-remoting-jmx protocol (JMXConnectorFactory.connect), JMXConnectorFactory complains that this protocol is not supported.
When debugging the code we see that JMXConnectorFactory uses Java ServiceLoader to find all implementations of JMXConnectorProvider. But it seems that ServiceLoader does not see META-INF/services/ coming from the imported Wildfly modules.
Seems to be a bug, isn't it?
What is the alternative way to connect to a http-remoting-jmx endpoint from an application running in Wildfly?