So if only open the ports that I am aware of, what will happen to that anonymous random UDP port? Wont I get some kind of error? For security purposes, I only want to open ports that I am fully aware of. I really didnt wont to leave open unused ports.
If you not open an unknown port it might be happen that your remote app will not connect correctly.
You will not have an error on the server side.
You might use the 'default' configuration if you do not want to have clustering, Corba ...
For most small installations it will be fit.
To remove unnecessary services which open ports you might have a look to this wiki http://community.jboss.org/wiki/JBoss5xTuningSlimming