1) Handle errors and inform user when jmx dependent agents are
configured and there is no jmx instance available.
Current errors do provide that info already, did you have something in mind?
2) If jmx-server is configured along with jmx dependent agents at the
same level, we need to deal with the initialization order issues. I'm
not sure how this was handled in 1.4, but in 2.0 it's all delegated to
spring (initialization oder or "depends-on" attribute maybe).
In 1.4 it was following the XML-declared order. Depends-on could be the way to go, but see if you can derive the names of the beans to depend on. Maybe getting the beans of JmxAgent type from the registry? Otherwise a user has to specify those attributes (that is, if Spring does not preserve the order).
Only allowing the user to configure jmx dependent agents if jmx-server
is declared (remember jmx agents locates first, then creates) I
believe would be more intuitive and less error-prone for users and
also easier for us to manage jmx agents dependencies.
The problem here is if any future agent depends on JMX, the schema has to be updated to support it. Not the case if they are top-level.
Andrew