}
private static void registerBrokerType(CarbonBrokerService brokerService, String className) throws BrokerConfigException {
try {
Class brokerTypeFactoryClass = Class.forName(className);
BrokerTypeFactory factory =
(BrokerTypeFactory) brokerTypeFactoryClass.newInstance();
brokerService.registerBrokerType(factory.getBrokerType());
} catch (ClassNotFoundException e) {
throw new BrokerConfigException("Broker class " + className + " can not be found");
} catch (IllegalAccessException e) {
throw new BrokerConfigException("Can not access the class " + className);
} catch (InstantiationException e) {