You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dhawan, Vikram (LNG-DAY)" <vi...@lexisnexis.com> on 2006/11/15 21:20:36 UTC

how to set rmiServerPort

Hi,

 

I was looking at the AMQ code for ManagementContext.java and found the
following code.

 

// Create the JMXConnectorServer

String rmiServer = "";

if (rmiServerPort != 0) {

    // This is handy to use if you have a firewall and need to

    // force JMX to use fixed ports.

    rmiServer = "localhost:" + rmiServerPort;

}

String serviceURL =
"service:jmx:rmi://"+rmiServer+"/jndi/rmi://localhost:"+connectorPort+connec
torPath;

        JMXServiceURL url=new JMXServiceURL(serviceURL);

 
connectorServer=JMXConnectorServerFactory.newJMXConnectorServer(url,null,mbe
anServer);

 

 

actually I am running in the exact situation as the comment says "FIREWALL".

 

I was trying to find out how to set rmiServerPort haven't found anything
yet. Any help will be appreciated.

 

Thanks!

 

Vik

 


Re: how to set rmiServerPort

Posted by Jonas Lim <jl...@exist.com>.
Hi Vik,

In your activemq configuration file you add the  ff. configuration :

    <managementContext>
       <managementContext connectorPort="1099" 
jmxDomainName="org.apache.activemq"  * rmiServerPort="1097"*/>
    </managementContext>

Regards,
Jonas


Dhawan, Vikram (LNG-DAY) wrote:
> Hi,
>
>  
>
> I was looking at the AMQ code for ManagementContext.java and found the
> following code.
>
>  
>
> // Create the JMXConnectorServer
>
> String rmiServer = "";
>
> if (rmiServerPort != 0) {
>
>     // This is handy to use if you have a firewall and need to
>
>     // force JMX to use fixed ports.
>
>     rmiServer = "localhost:" + rmiServerPort;
>
> }
>
> String serviceURL =
> "service:jmx:rmi://"+rmiServer+"/jndi/rmi://localhost:"+connectorPort+connec
> torPath;
>
>         JMXServiceURL url=new JMXServiceURL(serviceURL);
>
>  
> connectorServer=JMXConnectorServerFactory.newJMXConnectorServer(url,null,mbe
> anServer);
>
>  
>
>  
>
> actually I am running in the exact situation as the comment says "FIREWALL".
>
>  
>
> I was trying to find out how to set rmiServerPort haven't found anything
> yet. Any help will be appreciated.
>
>  
>
> Thanks!
>
>  
>
> Vik
>
>  
>
>
>