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

Shalin Shekhar Mangar commented on SOLR-256:
--------------------------------------------

Hoss, thanks for the comments.

* Specifying port=0 to ServiceUrl does not work, it blindly tries to connect to 
localhost on port 0 and fails with a java.rmi.ConnectException. We can try to 
do something like this:
{code}
ServerSocket server = new ServerSocket(0);
int port = server.getLocalPort();
server.close();
// Use the port
{code}
However it will not be reliable on every environment. I can put this into a 
loop and retry a fixed number of times before failing. That should be good 
enough.

* Agreed
* Copy/paste error :)
* That's a very good idea.
* Not sure if it really matters but that's very easy to do.

I shall give a patch shortly.

> 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
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: jmx.patch, jmx.patch, jmx.patch, jmx.patch, jmx.patch, 
> SOLR-256.patch, SOLR-256.patch, SOLR-256.patch, SOLR-256.patch, 
> SOLR-256.patch, SOLR-256.patch, SOLR-256.patch, SOLR-256.patch, SOLR-256.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