QpidServiceLoader<DurableConfigurationStoreFactory> qpidServiceLoader = new QpidServiceLoader<DurableConfigurationStoreFactory>();
Iterable<DurableConfigurationStoreFactory> factories = qpidServiceLoader.atLeastOneInstanceOf(DurableConfigurationStoreFactory.class);
for (DurableConfigurationStoreFactory durableConfigurationStoreFactory : factories)
{
String type = durableConfigurationStoreFactory.getType();
DurableConfigurationStoreFactory factory = _factories.put(type.toLowerCase(), durableConfigurationStoreFactory);
if (factory != null)
{
throw new IllegalStateException("DurableConfigurationStoreFactory with type name '" + type
+ "' is already registered using class '" + factory.getClass().getName() + "', can not register class '"
+ durableConfigurationStoreFactory.getClass().getName() + "'");
}
}
}