If we enable JMX MBean server for HMaster or Region server through VM arguments, the process will use one random which we cannot configure.
This can be a problem if that random port is configured for some other service.
This issue can be avoided by supporting a custom JMX Server.
The ports can be configured. If there is no ports configured, it will continue the same way as now.