Examples of BrokerConfigException


Examples of org.wso2.carbon.broker.core.exception.BrokerConfigException

        CarbonBrokerService brokerService = new CarbonBrokerService();
        OMElement brokerConfig = loadConfigXML();
        if (brokerConfig != null) {
            if (!brokerConfig.getQName().equals(
                    new QName(BrokerConstants.BROKER_CONF_NS, BrokerConstants.BROKER_CONF_ELE_ROOT))) {
                throw new BrokerConfigException("Broker config exception");
            }
            Iterator brokerTypesIter = brokerConfig.getChildrenWithName(
                    new QName(BrokerConstants.BROKER_CONF_NS,
                            BrokerConstants.BROKER_CONF_ELE_BROKER_TYPE));
            for (; brokerTypesIter.hasNext();) {
View Full Code Here

Examples of org.wso2.carbon.broker.core.exception.BrokerConfigException

            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) {
            throw new BrokerConfigException("Can not instantiate the class " + className);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.broker.core.exception.BrokerConfigException

            StAXOMBuilder builder = new StAXOMBuilder(parser);
            OMElement omElement = builder.getDocumentElement();
            omElement.build();
            return omElement;
        } catch (FileNotFoundException e) {
            throw new BrokerConfigException(BrokerConstants.BROKER_CONF
                    + "cannot be found in the path : " + path, e);
        } catch (XMLStreamException e) {
            throw new BrokerConfigException("Invalid XML for " + BrokerConstants.BROKER_CONF
                    + " located in the path : " + path, e);
        } finally {
            try {
                if (inputStream != null) {
                    inputStream.close();
                }
            } catch (IOException ingored) {
                throw new BrokerConfigException("Can not close the input stream");
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.