rupertlssmith wrote:i think you're on the right track with this. you definitely want a single registry running in a well known location. i'd run the registry on the webapp box, but in a separate process (this allows the webapp to be restarted without disrupting the registry). then, each remote box would register a connector in this registry, from which your webapp would locate the running instances. (note, you are not registering the mbeans with this registry, just an mbean connector for each remote mbean server).
I know that RMI can sometimes be problematic with respect to firewalls, because it assigns service ports dynamically, and firewall admins would like a fixed port number to open. I found this example, which explains one way of getting around this problem:
Another possibility seems to be to use JMXMP.
I don't think I really want the rmiregistry running on each server where an app instance resides. It seems to me that the 'registry', that is, the place where the JMX beans are looked up, should reside on the same machine where the JMX console webapp is running. Each app instance, when started will know the address of that machine, and attempt to register its MBeans with it (if it fails it can start anyway, and periodically retry exposing its management interface). Then the webapp just has one place to look to find all available apps.