Examples of BrokerEventProcessingException


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

        try {
            this.topicEventListener.onEvent(omElement);
        } catch (CEPEventProcessingException e) {
            String errorMessage = "can not process the message at cep level";
            log.error(errorMessage, e);
            throw new BrokerEventProcessingException(errorMessage, e);
        }
    }
View Full Code Here

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

            subscriber.setMessageListener(messageListener);
            topicConnection.start();
        } catch (JMSException e) {
            String error = "Failed to subscribe to topic:" + topicName;
            log.error(error, e);
            throw new BrokerEventProcessingException(error, e);
        }
    }
View Full Code Here

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

            TopicConnectionFactory topicConnectionFactory =
                    (TopicConnectionFactory) createInitialContext(brokerConfiguration).
                            lookup(BrokerConstants.BROKER_CONF_JMS_QPID_PROP_CONNECTION_FACTORY_LOOK_UP_NAME);
            return topicConnectionFactory.createTopicConnection();
        } catch (NamingException e) {
            throw new BrokerEventProcessingException("Can not create topic connection factory.", e);
        } catch (JMSException e) {
            throw new BrokerEventProcessingException("Can not create topic connection .", e);
        }
    }
View Full Code Here

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

        property.put(CarbonConstants.REQUEST_BASE_CONTEXT,"true");

        try {
            return new InitialContext(property);
        } catch (NamingException e) {
            throw new BrokerEventProcessingException("Can not create initial context with given parameters.", e);
        }
    }
View Full Code Here

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

            TextMessage jmsMessage = session.createTextMessage(message.toString());
            producer.send(jmsMessage);
        } catch (JMSException e) {
            String error = "Failed to publish to topic:" + topicName;
            log.error(error, e);
            throw new BrokerEventProcessingException(error, e);

        } finally {
            // close used resources.
            try {
                if (session != null) {
View Full Code Here

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

                            properties.get(BrokerConstants.BROKER_CONF_WS_PROP_USERNAME),
                            properties.get(BrokerConstants.BROKER_CONF_WS_PROP_PASSWORD));
            brokerClient.subscribe(topicName, httpEpr);
           
        } catch (BrokerClientException e) {
            throw new BrokerEventProcessingException("Can not create the broker client", e);
        } catch (AuthenticationExceptionException e) {
            throw new BrokerEventProcessingException("Can not authenticate the broker client", e);
        } catch (AxisFault axisFault) {
            throw new BrokerEventProcessingException("Can not subscribe", axisFault);
        }
    }
View Full Code Here

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

                                     properties.get(BrokerConstants.BROKER_CONF_WS_PROP_URI),
                                     properties.get(BrokerConstants.BROKER_CONF_WS_PROP_USERNAME),
                                     properties.get(BrokerConstants.BROKER_CONF_WS_PROP_PASSWORD));
            brokerClient.publish(topicName, message);
        } catch (AuthenticationExceptionException e) {
            throw new BrokerEventProcessingException("Can not authenticate the broker client", e);
        } catch (AxisFault axisFault) {
            throw new BrokerEventProcessingException("Can not subscribe", axisFault);
        }

    }
View Full Code Here

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

        // When publishing we only need to register the axis2 service
        // no subscribing
       try {
            Axis2Util.registerAxis2Service(topicName, brokerListener, brokerConfiguration, axisConfiguration);
        } catch (AxisFault axisFault) {
            throw new BrokerEventProcessingException("Can not create " +
                    "the axis2 service to receive events");
        }

    }
View Full Code Here

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

        Message eventMessage = new Message();
        eventMessage.setMessage(message);
        try {
            eventBroker.publishRobust(eventMessage, topicName);
        } catch (EventBrokerException e) {
            throw new BrokerEventProcessingException("Can not publish the to local broker ", e);
        }
    }
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.