-
1. Re: HornetQ 2.0.0 - embedded example - how to enable JMX via java API
clebert.suconic Apr 7, 2010 9:25 PM (in response to sergem)You could use this method:
HornetQServers.newHornetQServer(conf,java.lang.management.ManagementFactory.getPlatformMBeanServer(), false | true);
-
2. Re: HornetQ 2.0.0 - embedded example - how to enable JMX via java API
sergem Apr 7, 2010 11:13 PM (in response to clebert.suconic)Clebert,
Thanks for the tip. It is seems a step closer, but unfortunately JMX connection requests are still being refused. I am investigating on how to set or get configuration details out of JMX interface to see if I can poinpoint the issue.
Serge
-
3. Re: HornetQ 2.0.0 - embedded example - how to enable JMX via java API
timfox Apr 8, 2010 2:54 AM (in response to sergem)This is more a question of how to get the JMX server that is built into Java working, rather than a HornetQ specific question.
I'd take a look at the JMX tutorial on the Sun Java site.
-
4. Re: HornetQ 2.0.0 - embedded example - how to enable JMX via java API
clebert.suconic Apr 8, 2010 10:42 AM (in response to sergem)Also look at the JMX example that is part of hornetq.
On a distribution, go to /examples/jms/jmx
-
5. Re: HornetQ 2.0.0 - embedded example - how to enable JMX via java API
jmesnil Apr 8, 2010 10:53 AM (in response to sergem)1 of 1 people found this helpfulSerge Merzliakov wrote:
Configuration conf = new ConfigurationImpl();
...
conf.setJMXManagementEnabled(true);
This settings specifies that HornetQ resources will be manageable through JMX (i.e. registed in the MBeanServer).
However, it does not imply how JMX clients will connect to the MBeanServer.afaik, you need to specifiy the JVM parameters on startup. I don't know of a simple way to do that from code.
It should be possible (e.g. somehow create an instance of the JMX RMI connnector, bind it to the platform MBeanServer) but this is out of scope of HornetQ. You'll find more info on JMX web site to get you started: http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/