By default, the RMI protocol in JOnAS uses a random port at each startup, which implies that there is no way to configure a firewall as the port number changes each time the system restarts.
However you can easily configure the RMI port number by setting only
one property per protocol in the
$JONAS_BASE/conf/carol.properties
file.
To configure the RMI exported-port number, edit the
$JONAS_BASE/conf/carol.properties
file to change the following
protocols from 0 (choose a random port number) to the port number you
want:
For the RMI/JRMP protocol, change:
carol.jrmp.server.port=0
For the RMI/IRMI protocol, change:
carol.irmi.server.port=0
For the RMI/IIOP protocol, change:
carol.iiop.server.port=0