Package org.apache.camel

Examples of org.apache.camel.RuntimeCamelException


        transactionTemplate.execute(new TransactionCallbackWithoutResult() {
            protected void doInTransactionWithoutResult(TransactionStatus status) {
                try {
                    processNext(exchange);
                } catch (Exception e) {
                    throw new RuntimeCamelException(e);
                }
            }
        });

        LOG.info("transaction commit");
View Full Code Here


                    return marshall(type, value);
                }
            }
            return null;
        } catch (JAXBException e) {
            throw new RuntimeCamelException(e);
        }
    }
View Full Code Here

    public void onMessage(Message message) {
        try {
            Exchange exchange = endpoint.createExchange(message);
            processor.process(exchange);
        } catch (Exception e) {
            throw new RuntimeCamelException(e);
        }
    }
View Full Code Here

        return new BeanExchange(getContext());
    }

    public Consumer<BeanExchange> createConsumer(Processor processor) throws Exception {
        if (remoteInterfaces == null || remoteInterfaces.size() == 0) {
            throw new RuntimeCamelException("To create an RMI consumer, the RMI endpoint's remoteInterfaces property must be be configured.");
        }
        return new RmiConsumer(this, processor);
    }
View Full Code Here

    public RemoteFileConfiguration copy() {
        try {
            return (RemoteFileConfiguration)clone();
        } catch (CloneNotSupportedException e) {
            throw new RuntimeCamelException(e);
        }
    }
View Full Code Here

            }
            JmsExchange exchange = createExchange(message);
            processor.process((E)exchange);

        } catch (Exception e) {
            throw new RuntimeCamelException(e);
        }
    }
View Full Code Here

            }
        }
        buildDirectory(client, fileName.substring(0, fileName.lastIndexOf('/')));
        final boolean success = client.storeFile(fileName, payload);
        if (!success) {
            throw new RuntimeCamelException("error sending file");
        }
    }
View Full Code Here

    @Override
    protected Object createBody() {
        try {
            return getExchange().getEndpoint().getBinding().parseBody(this);
        } catch (IOException e) {
            throw new RuntimeCamelException(e);
        }
    }
View Full Code Here

        if ("ftp".equals(config.getProtocol())) {
            endpoint = new FtpEndpoint(uri, this, config);
        } else if ("sftp".equals(config.getProtocol())) {
            endpoint = new SftpEndpoint(uri, this, config);
        } else {
            throw new RuntimeCamelException("Unsupported protocol: " + config.getProtocol());
        }

        IntrospectionSupport.setProperties(endpoint.getConfiguration(), parameters);
        return endpoint;
    }
View Full Code Here

    }

    protected Object onError(TransactionStatus status, Throwable e) {
        status.setRollbackOnly();
        LOG.error("Caught: " + e, e);
        throw new RuntimeCamelException(e);
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.RuntimeCamelException

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.