: > However, I am having a harder time trying to access the SOLR MBeans. First,
: > I could have the wrong service URL. Second, I'm confused as to which MBeans
: > SOLR provides.
: >
: >: The service url is of the form --
: "service:jmx:rmi:///jndi/rmi://localhost:9999/solr". The following code
: snippet is taked from TestJmxMonitoredMap unit test:
: 
:         String url = "service:jmx:rmi:///jndi/rmi://localhost:9999/solr";
:         JMXServiceURL u = new JMXServiceURL(url);
:         connector = JMXConnectorFactory.connect(u);
:         mbeanServer = connector.getMBeanServerConnection();

That's the URL that the tests use, because it's connecting over RMI, to a 
local server, which was instantiated by solr...

if you are connecting from a remote App, it might be slightly different;
if you configure solr to register the MBeans an existing JMX MBeanServer 
(like the one created by TomCat) then it will different.

The wiki (and the example solrconfig.xml) have all the details...
    http://wiki.apache.org/solr/SolrJmx
...my advice would be to use jconsole to ensure that your JMX 
configuration for tomcat and solr is doing what you want *then* use 
whatever URL winds up working for jconsole to connect from your custom app




-Hoss

Reply via email to