private void createAndStartManagementPlugins(ServerConfiguration configuration, Broker broker) throws Exception
{
QpidServiceLoader<ManagementFactory> factories = new QpidServiceLoader<ManagementFactory>();
for (ManagementFactory managementFactory: factories.instancesOf(ManagementFactory.class))
{
ManagementPlugin managementPlugin = managementFactory.createInstance(configuration, broker);
if(managementPlugin != null)
{
try
{
managementPlugin.start();
}
catch(Exception e)
{
_logger.error("Management plugin " + managementPlugin.getClass().getSimpleName() + " failed to start normally, stopping it now", e);
managementPlugin.stop();
throw e;
}
_managmentInstanceList.add(managementPlugin);
}