Author: davsclaus
Date: Mon Dec 1 12:40:14 2008
New Revision: 722218
URL: http://svn.apache.org/viewvc?rev=722218&view=rev
Log:
CAMEL-1099: if noop=true then idempotent should also be true, to avoid
consuming the same files over and over again.
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java?rev=722218&r1=722217&r2=722218&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
Mon Dec 1 12:40:14 2008
@@ -99,6 +99,12 @@
public Consumer createConsumer(Processor processor) throws Exception {
Consumer result = new FileConsumer(this, processor);
+
+ // if noop=true then idempotent should also be configured
+ if (isNoop() && !isIdempotent()) {
+ LOG.info("Endpoint is configured with noop=true so forcing
endpoint to be idempotent as well");
+ setIdempotent(true);
+ }
// if idempotent and no repository set then create a default one
if (isIdempotent() && idempotentRepository == null) {