camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpalmer1026 <>
Subject Using Camel with Spring
Date Tue, 29 Mar 2011 18:56:03 GMT

I'm a Camel newbie and I'm trying to run a simple example to demonstrate how
to use Camel with Spring. I'm currently using Camel 2.7.0 with Spring 3.0.5.
When I run the code via the MainSpring class (see below), nothing happens.
Any ideas? 

My spring-config.xml is as follows:




My FileTransferLogger class is as follows:

import org.apache.camel.Exchange;
import org.apache.camel.Processor;

import java.util.Date;

public class FileTransferLogger implements Processor {
    public void process(Exchange exchange) throws Exception {
        System.out.println("Transferring " +
exchange.getIn().getHeader("CamelFileName") + " at " + new Date());

My main class is as follows:


public class MainSpring {
    public static void main(String[] args) throws Exception {
        new ClassPathXmlApplicationContext("spring-config.xml");

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message