camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pham Ngoc Hai (JIRA)" <>
Subject [jira] Created: (CAMEL-3358) Consumer template ignores options in uri for file consumer
Date Wed, 24 Nov 2010 06:49:24 GMT
Consumer template ignores options in uri for file consumer

                 Key: CAMEL-3358
             Project: Apache Camel
          Issue Type: Bug
    Affects Versions: 2.2.0
         Environment: Debian sid i686
sun jdk 1.6.0_22-b04

            Reporter: Pham Ngoc Hai

I have an OSGi bundle:

My camel-context.xml:
	<osgi:camelContext xmlns="">					
		<template id="producer" />
		<consumerTemplate id="consumer" />
		<routeBuilder ref="routeBuilder"/>

	<bean id="routeBuilder" class="com.proiam.postmarque.customer.RouteBuilder">	
	<bean id="customerFilePolling" class="com.proiam.postmarque.customer.CustomerFilePolling">
		<property name="pullAddress" value="${pullAddress}" />
		from("quartz://customer4pxfilein?cron=" + cronTime)		
		.beanRef("customer4PXFilePolling", "pollFiles");
public class CustomerFilePolling {
	//@AutoWired gives me NPE
	ConsumerTemplate consumer;
	//@AutoWired gives me NPE
	ProducerTemplate producer;

        public void pollFiles() {
		while (true) {
			//System.out.println("Prepare to comsume");
			Exchange exchange = consumer.receive("file:///tmp/test/in?move=../done&readLock=changed",
			if (exchange == null) {
			Exchange result = producer.send("activemq:queue:CustomerFileInBody", exchange);
			if (result.isFailed()) {
				System.out.println("pollFiles processor raised an error!");

Everything is fine except that after being processed, the files are still there together with
their .camelLock 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message