[ 
https://issues.apache.org/jira/browse/SOLR-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528615
 ] 

Hoss Man commented on SOLR-256:
-------------------------------

Sami: thanks for the pointer to the spring docs ... both because it's 
informative and because it made me realize this issue is still open, i thought 
i'd committed this a long time ago ... doh!

Spring's approach to figuring out if there is an MBeanServer is basically the 
same as what we've been looking at doing: call 
MBeanServerFactory.findMBeanServer and see what we get ... they just put some 
more bells and whistles on it to warn you if more then one is found and you 
haven't configured the agentId of the one you want (which is a good idea)

the general approach spring takes to JMX as a whole however is subtly different 
then what we've been talking about:  so far we've discussed:

 * having Solr specific configs for creating a Solr specific MBeanServer and if 
those are set, then wrap all of our info registry stuff so they are MBean aware.
...OR...
 * having no Solr specific config options and wrapping the info registry stuff 
in MBeans if we detect an MBeanServer already running.

Spring's appraoch:
 * have spring specific configs that specify things should be wraped in MBeans
 * have spring specific configs that specify if a spring specific MBeanServer 
should be created, and if not which existing MBeanServer to try and use by 
agentId.
 * if the first config option is set, but not the second, then register those 
MBeans with whatever MBeanServer you can find.

...this seems like the right way to go.  people that don't want any JMX at all 
won't get it.  people who want JMX if-and-only-if they've activate an 
MBeanServer via the servlet container can configure the MBean wrapping option.  
people that want Solr to do it all can configure solr with that info as well.

basically it's a merge of both styles of patches so far.

Unfortunately most of the existing patches are now unusable because of the 
Multi-core refactoring ... but i will try to work on a new patch (not sure when 
though, so if anyone else is gung ho don't let me stop you)



> Stats via JMX
> -------------
>
>                 Key: SOLR-256
>                 URL: https://issues.apache.org/jira/browse/SOLR-256
>             Project: Solr
>          Issue Type: New Feature
>          Components: search, update
>            Reporter: Sharad Agarwal
>            Priority: Minor
>         Attachments: jmx.patch, jmx.patch, jmx.patch, jmx.patch, jmx.patch
>
>
> This patch adds JMX capability to get statistics from all the SolrInfoMBean.
> The implementation is done such a way to minimize code changes. 
> In SolrInfoRegistry, I have overloaded Map's  put and remove methods to 
> register and unregister SolrInfoMBean in MBeanServer. 
> Later on, I am planning to use register and unregister methods in 
> SolrInfoRegistry and removing getRegistry() method (Hiding the map instance 
> to other classes)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to