Examples of EventBrokerConfigurationException


Examples of org.wso2.carbon.event.core.exception.EventBrokerConfigurationException

            if (!userRegistry.resourceExists(this.indexStoragePath)) {
                userRegistry.put(this.indexStoragePath, userRegistry.newResource());
            }

        } catch (RegistryException e) {
            throw new EventBrokerConfigurationException("Can not access the registry ", e);
        } catch (UserStoreException e) {
            throw new EventBrokerConfigurationException("Can not access the user registry", e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.event.core.exception.EventBrokerConfigurationException

                                                      EventBrokerConstants.EB_CONF_ATTR_CLASS));
        try {
            Class factoryClass = Class.forName(className);
            return factoryClass.newInstance();
        } catch (ClassNotFoundException e) {
            throw new EventBrokerConfigurationException("Class " + className + " not found ", e);
        } catch (IllegalAccessException e) {
            throw new EventBrokerConfigurationException("Class not be accesed ", e);
        } catch (InstantiationException e) {
            throw new EventBrokerConfigurationException("Class not be instantiated ", e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.event.core.exception.EventBrokerConfigurationException

    public static EventBroker createEventBroker() throws EventBrokerConfigurationException {
        OMElement ebConfig = loadConfigXML();
        if (!ebConfig.getQName().equals(
                new QName(EventBrokerConstants.EB_CONF_NAMESPACE, EventBrokerConstants.EB_CONF_ELE_ROOT))) {
            throw new EventBrokerConfigurationException("Invalid root element in event broker config");
        }

        OMElement eventBroker =
                ebConfig.getFirstChildWithName(new QName(EventBrokerConstants.EB_CONF_NAMESPACE,
                        EventBrokerConstants.EB_CONF_ELE_EVENT_BROKER));
        String className =
                eventBroker.getAttributeValue(new QName(null, EventBrokerConstants.EB_CONF_ATTR_CLASS));

        try {
            Class brokerImplClass = Class.forName(className);
            EventBrokerFactory eventBrokerFactory =
                    (EventBrokerFactory) brokerImplClass.newInstance();
            return eventBrokerFactory.getEventBroker(eventBroker);
        } catch (ClassNotFoundException e) {
            throw new EventBrokerConfigurationException("Can not load the class " + className, e);
        } catch (IllegalAccessException e) {
            throw new EventBrokerConfigurationException("Can not access the class " + className, e);
        } catch (InstantiationException e) {
            throw new EventBrokerConfigurationException("Can not instantiate the class " + className, e);
        }


    }
View Full Code Here

Examples of org.wso2.carbon.event.core.exception.EventBrokerConfigurationException

            StAXOMBuilder builder = new StAXOMBuilder(parser);
            OMElement omElement = builder.getDocumentElement();
            omElement.build();
            return omElement;
        } catch (FileNotFoundException e) {
            throw new EventBrokerConfigurationException(EventBrokerConstants.EB_CONF
                    + "cannot be found in the path : " + path, e);
        } catch (XMLStreamException e) {
            throw new EventBrokerConfigurationException("Invalid XML for " + EventBrokerConstants.EB_CONF
                    + " located in the path : " + path, e);
        } finally {
            try {
                if (inputStream != null) {
                    inputStream.close();
                }
            } catch (IOException ingored) {
                throw new EventBrokerConfigurationException("Can not close the input stream");
            }
        }
    }
View Full Code Here

Examples of org.wso2.carbon.event.core.exception.EventBrokerConfigurationException

                    }
                    delivaryManager.subscribe(subscription);
                }
            }
        } catch (EventBrokerException e) {
            throw new EventBrokerConfigurationException("Can not get the subscriptions ", e);
        }

    }
View Full Code Here

Examples of org.wso2.carbon.event.core.exception.EventBrokerConfigurationException

                    qpidJMSDelivaryManager.setQpidPort(qpidPort);
                    qpidJMSDelivaryManager.setClientID(clientID);
                    qpidJMSDelivaryManager.setVirtualHostName(virtualHostName);

                } else {
                    throw new EventBrokerConfigurationException("Can not authenticate to the remote messge broker ");
                }
            } catch (AxisFault axisFault) {
                throw new EventBrokerConfigurationException("Can not connect to the remote Qpid Service ", axisFault);
            } catch (SocketException e) {
                throw new EventBrokerConfigurationException("Can not connect to the remote Qpid Service ", e);
            } catch (AuthenticationExceptionException e) {
                throw new EventBrokerConfigurationException("Can not connect to the remote Qpid Service ", e);
            } catch (RemoteException e) {
                throw new EventBrokerConfigurationException("Can not connect to the remote Qpid Service ", e);
            }
        }

        return qpidJMSDelivaryManager;
View Full Code Here

Examples of org.wso2.carbon.event.core.exception.EventBrokerConfigurationException

                    }
                    registrySubscriptionManager.addSubscription(subscription);

                }
            } catch (EventBrokerException e) {
                throw new EventBrokerConfigurationException(
                              "Can not access the registry to read subscrptions ", e);
            }
        }

        return registrySubscriptionManager;
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.