Add dependency support for direct mbeans.

[WFLY-3921]; 
We should be able to depend on existing mbeans from jboss-service.xml.
(e.g. mbeans registered directly from JMX API)
1) is not the same, it doesn't add aliases.

I need to diff between real plain mbean registration,
or registration of jboss-service.xml mbeans - which already add create/start services.

> On Oct 6, 2014, at 23:26, Brian Stansberry <notifications@github.com> wrote:
> 
> In jmx/src/main/java/org/jboss/as/jmx/MBeanServerExt.java:
> 
> > +package org.jboss.as.jmx;
> > +
> > +import javax.management.InstanceAlreadyExistsException;
> > +import javax.management.MBeanRegistrationException;
> > +import javax.management.NotCompliantMBeanException;
> > +import javax.management.ObjectInstance;
> > +import javax.management.ObjectName;
> > +
> > +/**
> > + * Expose internal register / unregister.
> > + *
> > + * @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a>
> > + */
> > +interface MBeanServerExt {
> > +    ObjectInstance registerMBeanInternal(Object mbean, ObjectName name) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException;
> > +}
> I don't understand the need for this interface. There are 2 impls:
> 
> 1) MscMBeanServer. This implements registerMBeanInternal exactly the same as registerMBean, so the added method adds nothing.
> 
> 2) PluggableMBeanServerImpl. The only thing registerMBeanInternal does is set a boolean var to true which then triggers calling registerMBeanInternal on the delegate. But the only delegate is MscMBeanServer which... see 1).
> 
> —
> Reply to this email directly or view it on GitHub.