return false;
}
private void start() throws JMException, IOException
{
Broker broker = getBroker();
Port connectorPort = null;
Port registryPort = null;
Collection<Port> ports = broker.getPorts();
for (Port port : ports)
{
if (State.QUIESCED.equals(port.getActualState()))
{
continue;
}
if(isRegistryPort(port))
{
registryPort = port;
}
else if(isConnectorPort(port))
{
connectorPort = port;
}
}
if(connectorPort == null)
{
throw new IllegalStateException("No JMX connector port found supporting protocol " + Protocol.JMX_RMI);
}
if(registryPort == null)
{
throw new IllegalStateException("No JMX RMI port found supporting protocol " + Protocol.RMI);
}
_objectRegistry = new JMXManagedObjectRegistry(broker, connectorPort, registryPort, this);
broker.addChangeListener(this);
synchronized (_children)
{
for(VirtualHost virtualHost : broker.getVirtualHosts())
{
if(!_children.containsKey(virtualHost))
{
if(LOGGER.isDebugEnabled())
{
LOGGER.debug("Create MBean for virtual host:" + virtualHost.getName());
}
VirtualHostMBean mbean = new VirtualHostMBean(virtualHost, _objectRegistry);
if(LOGGER.isDebugEnabled())
{
LOGGER.debug("Check for additional MBeans for virtual host:" + virtualHost.getName());
}
createAdditionalMBeansFromProviders(virtualHost, mbean);
}
}
Collection<AuthenticationProvider> authenticationProviders = broker.getAuthenticationProviders();
for (AuthenticationProvider authenticationProvider : authenticationProviders)
{
if(authenticationProvider instanceof PasswordCredentialManagingAuthenticationProvider)
{
UserManagementMBean mbean = new UserManagementMBean(