Hi,

I am using camel->quartz component. My use case is "Have to merge all
avaliable files for every 5 mins." In this example, I don't want to run
parallel thread.

final FileEndpoint enpoint = (FileEndpoint)endpoint("file:src/ip/ch1");
final RouteBuilder route = new Filecopy("mergeRoute",enpoint);
context.addRoutes(route);
from("quartz://myTimer/myTimerName?cron=5+*+*+*+*+?&stateful=true")
                                .process(new Processor() {
               
                                        
                                        @Override
                                        public void process(Exchange exchange) 
throws Exception {
                                                File[] files = 
enpoint.getFile().listFiles();
                                                if(files != null && 
files.length > 0){
                                                        
context.startRoute("mergeRoute");
                                                } else {
                                                        
System.out.println("--No Files--");
                                                }
                                        }
                                
});

Filecopy class is another Route, which will do file merge and oncompletion
will stop Route.

If merging is taking more than 5mins, another Route is starting and merging
files parallel. To stop this parallel processing what i need to do? 



--
View this message in context: 
http://camel.465427.n5.nabble.com/apache-came-with-quartz-no-concurrent-execution-tp4655221p4655221.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to