You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by stegven <ma...@sas.com> on 2011/12/06 17:48:42 UTC

Re: Using the jmxmp jmx remote protocol in OSGi

If all you need to do is use the JMXMP connector from within OSGi, and you
don't care about dynamic support for other protocols, here's a really simple
solution that I am using. Simply make sure your copy of
jmxremote_optional.jar has proper OSGi headers in its manifest, add that jar
as a plug-in to your project, and in the code that creates your JMX
connector server, add this:

	Map<String, Object> env = new HashMap<String, Object>();
	env.put(JMXConnectorServerFactory.PROTOCOL_PROVIDER_PACKAGES,
		"com.sun.jmx.remote.protocol");


When you invoke JMXConnectorServerFactory.newJMXConnectorServer, provide the
above map as the second argument. 

You can use the same thing for creating a connector client with
JMXConnectorFactory.newJMXConnector().

--
View this message in context: http://karaf.922171.n3.nabble.com/Using-the-jmxmp-jmx-remote-protocol-in-OSGi-tp3298676p3564868.html
Sent from the Karaf - User mailing list archive at Nabble.com.