Some thoughts on how JMX intersects with domain management.
- The primary goal of AS 7 is to develop a management API that has clearly delimited boundaries, can be fully supported and is stable across releases. JMX is not very good fit for this because:
- The type system of the domain model may not map very well to what JMX supports.
- Projects we integrate often support usage outside of JBoss AS and have developed JMX-based management interfaces appropriate for such use. Simply by getting hold of the MBeanServer in the AS, those projects can expose those interfaces, and my assumption is they will do so. However, this is counter to the desire for a stable API with clearly delimited boundaries. IMO it is not realistic to expect that every project we integrate will conform it's JMX interface to the AS' requirements
- Even if projects did conform to AS' requirements, the services and their JMX interfaces are deployed on Servers, not on the DomainController. The AS 7 management architecture is based on using the DC as the central point for performing management operations. (We may have exceptions to that, but those will be well-defined exceptions.)
- For the above reasons, the primary management interfaces for AS 7 should be our programatic interface and a REST interface.
- All that said, people like to use JMX for management! So, to the extent we can, IMO we should expose a JMX management interface.
Proceeding from the above:
- The DC should expose a JMX interface.
- Said interface does not need to express the entire management API. It can be limited to that portion of the overall API that can properly be expressed in JMX.
- The portion of the management API that is exposed via JMX should have a separate JMX domain namespace from any other JMX interface exposed by any project. For now I'll call this the jboss.as.mgmt domain.
- The documentation should clearly state that the only portion of the JMX interface exposed by an AS 7 domain member that should be considered a stable API is that portion in the jboss.as.mgmt domain.
- The documentation should clearly state that using any JMX interface outside the jboss.as.mgmt domain is at your own risk, and in particular that setting attributes and invoking operations could lead to the configuration of the relevant Server being inconsistent with the domain.
- When AS 7 is productized, use of any JMX interface outside the jboss.as.mgmt domain should be unsupported.
We can look into whether there should be a jboss.as.mgmt JMX interface on individual servers, i.e. beyond the DC. Well, at least whether there should be a writable interface.
Above statements about "use at your own risk" aside, the JMX interfaces different projects expose will likely include things not available via the official domain management API. (New features, obscure settings, etc.)