Re: JMX, RMI and firewalls

David Campbell <[email protected]> Wed, 24 May 2006 10:10:43 +0100
Newsgroups gmane.text.xml.resin.user
Message-ID <[email protected]>
Damien Mascord wrote:

Hi,

> RMI is a hard beast to tame.  There are many places where RMI calls
> ServerSocket and/or Socket to do it's communication, and hence the
> approach that we have had to take is to create a ServerSocketFactory and
> replace the default RMIServerSocketFactory.  It takes care of the
> unicast case, though for multi-cast it's still a bit hit and miss.

We have spent quite a bit of time looking at this.  What seems to happen 
in that the JMX connection is called, a connection is made to the 
jmxremote.port to expose the objects then communication takes places on 
a random high number port, ie one over 32768.  The high number port 
changes everytime the JVM is restarted.  Other containers seem to allow 
not only the setting of the jmxremote.port but allow a static RMI port too.

> Seems as though there is a way using the ManagementFactory:
> http://archives.java.sun.com/cgi-bin/wa?A2=ind0507&L=jmx-forum&D=0&P=1221
> 
> Check that out to see if that resolves the issue?

Thanks, will forward this to our developers and see what they say.  We 
have worked round the issue by opening the high level ports between the 
Resin servers for now for.

Cheers

Dave