camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franklin Antony <>
Subject Apache Camel and calling Spring Business Services
Date Wed, 03 Dec 2008 18:52:25 GMT

Dear All,
  I recently started to use Camel for integration purposes. I am very much
confused as to where the Spring business services have to be injected into
Camel. Are they usually injected into RouteBuilder? 

I have a use case currently where I listen to a directory for new files.
Then I get the file, rename it and move the file into another directory with
the new name. During this process I log the old and new file names into the

This is where problem starts. I have a Spring business service thats does
the logging for me. I am not sure where and how to inject the business
service. Also what is the best practice to place the service. Again how is
it possible to pass the new and old file names to this service ?

 from("file://C://test//from").process(new Processor() {

                    public void process(Exchange e) {
                       //Should the Spring business service for logging to
DB be called here ??

I really don't prefer this . Just feels like the routebuilder is doing more
that what its supposed to do.

>From how much I have used Camel,I am so much happy I am using it now :-D .
But I still am getting confused as to where the Spring business services
should be. I would really appreciate if the gurus of Camel can help me out
on this.

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

View raw message