You are viewing a read-only archive of the Blogs.Harvard network. Learn more.
Skip to content

Hints on getting JOnAS + RMI + firewalls happy

I’ve been playing with JOnAS lately and have been puzzling out how to get

RMI working through a firewall. Normally RMI uses dynamic ports which

represents pain and suffering if you want to use JMX. The documentation

for JOnAS is located

here. After glancing at the JOnAS config I was disheartened to find it

wasn’t just ‘set the RMI port’. It was set the port for a particular protocol

RMI will run over:

  • For the RMI/JRMP protocol, change:
    carol.jrmp.server.port=0
    
    
  • For the RMI/Jeremie protocol, change:
    carol.jeremie.server.port=0
    
    
  • For the RMI/IIOP protocol, change:
    carol.iiop.server.port=0
    
    

Oh great. All those wonderful docs on JMX that I read

before didn’t exactly mention I’d have to

choose the transport protocol for RMI. Why is it everytime you try to learn

more about Java stuff it’s like falling into the rabbit hole?

So after poking around I found what I was looking for in the Javadocs

on JMX here. This is what the docs say:

The RMI connector supports both the JRMP and the IIOP transports for RMI.

Like most connectors in the JMX Remote API, an RMI connector usually has an address, which is a JMXServiceURL. The protocol part of this address is rmi for a connector that uses the default RMI transport (JRMP), or iiop for a connector that uses RMI/IIOP

So there you have it. By DEFAULT JMX will default to using JRMP but it

can also use IIOP. Lots more Java acronym soup to figure out.

References:

Be Sociable, Share!