Package org.apache.camel

Examples of org.apache.camel.CamelException


                exchange.setException((Throwable) responseObject);
            } else if (responseObject instanceof Message) {
                Message response = (Message) responseObject;
                SjmsExchangeMessageHelper.populateExchange(response, exchange, true, getEndpoint().getJmsKeyFormatStrategy());
            } else {
                exchange.setException(new CamelException("Unknown response type: " + responseObject));
            }
        }

        callback.done(isSynchronous());
    }
View Full Code Here


                    }
                });
                answer = new MessageConsumerResources(session, messageConsumer, replyToDestination);
            } catch (Exception e) {
                log.error("Unable to create the MessageConsumerResource: " + e.getLocalizedMessage());
                throw new CamelException(e);
            } finally {
                getConnectionResource().returnConnection(conn);
            }
            return answer;
        }
View Full Code Here

        });
        
        try {
            channelLatch.await(configuration.getConnectTimeout(), TimeUnit.MILLISECONDS);
        } catch (InterruptedException ex) {
            throw new CamelException("Interrupted while waiting for " + "connection to "
                                     + configuration.getAddress());
        }
       

        if (!channelFuture.isDone() || !channelFuture.isSuccess()) {
View Full Code Here

        boolean mepSet = parameters.containsKey("exchangePattern");
        if (namedReplyToSet && mepSet) {
            if (!parameters.get("exchangePattern").equals(ExchangePattern.InOut.toString())) {
                String namedReplyTo = (String) parameters.get("namedReplyTo");
                ExchangePattern mep = ExchangePattern.valueOf((String) parameters.get("exchangePattern"));
                throw new CamelException("Setting parameter namedReplyTo=" + namedReplyTo + " requires a MEP of type InOut. Parameter exchangePattern is set to " + mep);
            }
        }
    }
View Full Code Here

        });

        try {
            channelLatch.await(configuration.getConnectTimeout(), TimeUnit.MILLISECONDS);
        } catch (InterruptedException ex) {
            throw new CamelException("Interrupted while waiting for " + "connection to "
                                     + configuration.getAddress());
        }


        if (!channelFuture.isDone() || !channelFuture.isSuccess()) {
View Full Code Here

        boolean mepSet = parameters.containsKey("exchangePattern");
        if (namedReplyToSet && mepSet) {
            if (!parameters.get("exchangePattern").equals(ExchangePattern.InOut.toString())) {
                String namedReplyTo = (String)parameters.get("namedReplyTo");
                ExchangePattern mep = ExchangePattern.valueOf((String)parameters.get("exchangePattern"));
                throw new CamelException("Setting parameter namedReplyTo=" + namedReplyTo + " requires a MEP of type InOut. Parameter exchangePattern is set to " + mep);
            }
        }
    }
View Full Code Here

        this.configuration = configuration;
    }

    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
        if (getCamelContext() == null) {
            throw new CamelException("No Camel context has been provided to this zookeeper component");
        }

        ZooKeeperConfiguration config = getConfiguration().copy();
        extractConfigFromUri(uri, config);
        setProperties(config, parameters);
View Full Code Here

            for (RouteBuilderDefinition builderRef : getBuilderRefs()) {
                RoutesBuilder routes = builderRef.createRoutes(getContext());
                if (routes != null) {
                    this.builders.add(routes);
                } else {
                    throw new CamelException("Cannot find any routes with this RouteBuilder reference: " + builderRef);
                }
            }
        }

        // install already configured routes
View Full Code Here

            } else {
                messageProducer = JmsObjectFactory.createQueueProducer(session, getDestinationName());
            }

            if (session == null) {
                throw new CamelException("Message Consumer Creation Exception: Session is NULL");
            }
            if (messageProducer == null) {
                throw new CamelException("Message Consumer Creation Exception: MessageProducer is NULL");
            }
           
            answer = new MessageProducerResources(session, messageProducer);

        } catch (Exception e) {
View Full Code Here

                        exchange.setException((Throwable)responseObject);
                    } else if (responseObject instanceof Message) {
                        Message response = (Message)responseObject;
                        SjmsExchangeMessageHelper.populateExchange(response, exchange, true);
                    } else {
                        exchange.setException(new CamelException("Unknown response type: " + responseObject));
                    }
                }
            }

            callback.done(isSynchronous());
View Full Code Here

TOP

Related Classes of org.apache.camel.CamelException

Copyright © 2018 www.massapicom. 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.