You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2011/01/21 05:59:58 UTC
svn commit: r1061633 -
/camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java
Author: hadrian
Date: Fri Jan 21 04:59:58 2011
New Revision: 1061633
URL: http://svn.apache.org/viewvc?rev=1061633&view=rev
Log:
CAMEL-3569. Fix badly generated code by component archetype
Modified:
camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java
Modified: camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java?rev=1061633&r1=1061632&r2=1061633&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java Fri Jan 21 04:59:58 2011
@@ -34,8 +34,7 @@ public class HelloWorldConsumer extends
}
@Override
- // poll method will fire every 500 ms by default
- protected void poll() throws Exception {
+ protected int poll() throws Exception {
Exchange exchange = endpoint.createExchange();
// create a message body
@@ -45,12 +44,12 @@ public class HelloWorldConsumer extends
try {
// send message to next processor in the route
getProcessor().process(exchange);
+ return 1; // number of messages polled
} finally {
// log exception if an exception occurred and was not handled
if (exchange.getException() != null) {
getExceptionHandler().handleException("Error processing exchange", exchange, exchange.getException());
}
- }
+ }
}
-
}