Author: davsclaus
Date: Tue Oct 12 04:22:48 2010
New Revision: 1021623

URL: http://svn.apache.org/viewvc?rev=1021623&view=rev
Log:
CAMEL-3216: Fixed scheduled poll to not let thread die, to ensure the scheduler 
keeps running.

Modified:
    
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java?rev=1021623&r1=1021622&r2=1021623&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollConsumer.java
 Tue Oct 12 04:22:48 2010
@@ -114,15 +114,15 @@ public abstract class ScheduledPollConsu
                     }
                 } catch (Throwable t) {
                     // catch throwable to not let the thread die
-                    // log the fatal error as the JDK itself may not log it 
for us
-                    log.fatal("Consumer " + this +  " could not poll endpoint: 
" + getEndpoint().getEndpointUri() + " caused by: " + t.getMessage(), t);
+                    getExceptionHandler().handleException("Consumer " + this + 
 " failed polling endpoint: " + getEndpoint().getEndpointUri()
+                            + ". Will try again at next poll", t);
                     // we are done due this fatal error
                     done = true;
                 }
             } catch (Throwable t) {
                 // catch throwable to not let the thread die
-                // log the fatal error as the JDK itself may not log it for us
-                log.fatal("Consumer " + this +  " could not poll endpoint: " + 
getEndpoint().getEndpointUri() + " caused by: " + t.getMessage(), t);
+                getExceptionHandler().handleException("Consumer " + this +  " 
failed polling endpoint: " + getEndpoint().getEndpointUri()
+                        + ". Will try again at next poll", t);
                 // we are done due this fatal error
                 done = true;
             }


Reply via email to